             [puppetlabs.services.legacy-routes.legacy-routes-core :refer :all]
             [puppetlabs.services.master.master-core :as master-core]
             [ring.mock.request :as mock]
-            [ring.util.codec :as ring-codec]
-            [clojure.string :as str]))
+            [ring.util.codec :as ring-codec]))
 
 (use-fixtures :once schema-test/validate-schemas)
 

    "pson, s, raw, foo" "pson, binary, foo"
    "s, pson, foo" "binary, pson, foo"))

;
(def accept-header-test-data
  "Nested map of request data.  The map keys represent URI paths, the request
  method, the example input, and the expected output.

                                             :put accept-header-s-pson-examples}
   })

(defn build-app
  "Build a ring app with handler as the handler and the identity function as
  the ca-handler"
  [handler]
  (build-ring-handler
    handler master-mount master-api-version identity ca-mount ca-api-version))

(defn munged-request
  "Return the request that would be sent to the master-handler after processing
  by the legacy-routes handler."
  [request]
  (let [mem (atom {:tested false})
        tapped-app (build-app #(swap! mem assoc :request %))]
    (tapped-app request)
    (:request @mem)))

(deftest test-legacy-routes
  (let [app     (build-ring-handler
