             (.deleteOnExit))]
     (spit f contents)
     f))
+
 
 (defrecord MockStore [state results-index results]
   hecuba/Cassandra

            [qbits.hayt :as hayt]
            [clojure.walk :refer (prewalk)]
            [ring.mock.request :refer (request content-type)]
            ))

(defn- multipart-request [method params]
    {:request {:request-method method

           (get-in result [:response :body])))
    )
  )

(deftest s3-key-from-test
  (is (= (s3-key-from {:src-name "downloads" :entity_id 1234})
         "downloads/1234/data")
      (= (s3-key-from {:src-name "downloads" :entity_id 1234 :suffix "status"})
         "downloads/1234/status")))

(deftest item-from-s3-key-test
  (is (= {:src-name "downloads" :entity_id "1234"}
         (item-from-s3-key "downloads/1234"))
      (= nil
         (item-from-s3-key "downloads/1234/123/123"))))
