          (= (-> revised-record (get "repeat") first (get "repeat/photo1")
                 :download_url)
             (url
-             base-uri
-             "files/287632?filename=prabhasp/attachments/Bhkt36_hist2.jpg")))
+             media-url
+             "287632?filename=prabhasp/attachments/Bhkt36_hist2.jpg")))
         (is
          (= (-> revised-record (get "repeat") first (get "repeat/photo2")
                 :download_url)
             (url
-             base-uri
-             "files/287633?filename=prabhasp/attachments/Bhkt36_hist.jpg")))))))
+             media-url
+             "287633?filename=prabhasp/attachments/Bhkt36_hist.jpg")))))))

            revised-record (first integrated-data)]
        (is (= (-> revised-record (get "historic_photo") :download_url)
               (url
                base-uri
                "files/287632?filename=prabhasp/attachments/Bhkt36_hist2.jpg")))
        (is (=
             (-> revised-record (get "historic_photo") :small_download_url)
             (url
              base-uri
              (str
               "files/287632?filename=prabhasp/attachments/Bhkt36_hist2.jpg"
               "&suffix=small"))))))
    (testing "data with no images doesn't get touched"
      (let [form [{:type "string" :name "historic_photo"

(def big-thin-data   (data-gen 1 100))
(def small-fat-data  (data-gen 100 10))
(def big-fat-data    (data-gen 100 100))
(def media-url (str @base-uri "files"))

;; TESTS

