             [clj-momo.lib.clj-time.format :as tf]
             [ctia.test-helpers.core :as hc]
             [clojure.string :as string]
+            [clojure.pprint :refer [pprint]]
             [schema-generators.generators :as g]
             [ctia.http.routes.common :refer [now]]
             [schema-tools.core :as st]

            1)
        "[from to[ should not exceed one year")))

(defn- test-cardinality
  "test one field cardinality, examples are already created."
  [examples entity field]
  (testing (format "cardinality %s %s" entity field)
    (let [expected (-> (normalized-values examples field)
                       set
                       count)
          _ (assert (pos? expected))
          {{:keys [from to]} :filters
           :as res} (cardinality entity

      (is (= expected
             (->> (parse-field field)
                  (get-in (:data res))
                  (map :value)))
          (error-helper-msg prepared))
      (check-from-to from to))))

(defn- to-granularity-first-day
