   (binding [*log-db-calls* false]
     (or (sel :one Database :name db-name)
         (do (when-not (.exists (clojure.java.io/file (str test-db-filename ".h2.db"))) ; only create + populate the test DB file if needed
-              (with-test-db
-                (dorun (map create-table
-                            data/test-data))))
+              (create-and-populate-tables))
             (println "Creating new metabase Database object...")
             (let [db (ins Database
                           :organization_id (:id (test-org))

                             [org :refer [Org]]
                             [org-perm :refer [OrgPerm]])))

(declare create-table
         with-test-db)

(def ^:private db-name "Test Database")
(def ^:private org-name "Test Organization")

       (interpose ", ")
       (apply str)))

(defn- create-and-populate-table
  "Create a Table named TABLE-NAME and load its data."
  [[table-name {:keys [fields rows]}]]
  {:pre [(keyword? table-name)
