             [clj-time.core :as t]
             [environ.core :refer [env]]
             [clj-factory.core :refer [factory]]
+            [clj-money.util :refer [file-ext
+                                    file-name]]
             [clj-money.io :refer [read-bytes]]
             [clj-money.serialization :as serialization]
             [clj-money.factories.user-factory]


(use-fixtures :each (partial reset-db storage-spec))

(def gnucash-sample
  (io/input-stream "resources/fixtures/sample.gnucash"))

(def import-context
  {:users [(factory :user, {:email "john@doe.com"})]
   :images [{:body (read-bytes gnucash-sample)
             :content-type "application/gnucash"
             :original-filename "sample.gnucash"}]
   :imports [{:entity-name "Personal"
              :image-id "sample.gnucash"}]})


              :image-id "budget_sample.gnucash"}]})

(deftest receive-updates-asynchronously
  (let [context (serialization/realize
                  storage-spec
                  (import-context :gnucash))
        user (-> context :users first)
        image (-> context :images first)
        imp (-> context :imports first)
