<commit_before>(ns kilo.api-test-config
  (:require [kilo.web :as k-web]
            [clojure.test :refer :all]
            [ring.mock.request :as rmr]
            [kilo.db-config :as k-testdb]
            [clojure.java.jdbc :refer [with-connection] ]))

(defn set-up-test []
  ;; this is where we would also initialize and populate test db

  ;; the following vars containing the various responses are available to the
  ;; tests defined in web_test.clj

  (k-testdb/setup-test-db!)
  (k-testdb/set-korma-connection!)
  ;;(def onboarding-response (a-web/onboarding (rmr/request :get "/")))
  (def get-user (k-web/app (rmr/request :get "/kilo/user/99999"))))
  
(defn teardown-test []
  (k-testdb/teardown-test-db!)
  )

(defn api-test-config
  [api-tests]
  (set-up-test)
  (api-tests)
  
  (try
    (teardown-test)
    (finally (println "Kilo API test complete"))))

<commit_msg>Kilo : Test : Removing unused require element for clojure.java.jdbc<commit_after>(ns kilo.api-test-config
  (:require [kilo.web :as k-web]
            [clojure.test :refer :all]
            [ring.mock.request :as rmr]
            [kilo.db-config :as k-testdb]))

(defn set-up-test []
  ;; this is where we would also initialize and populate test db

  ;; the following vars containing the various responses are available to the
  ;; tests defined in web_test.clj

  (k-testdb/setup-test-db!)
  (k-testdb/set-korma-connection!)
  ;;(def onboarding-response (a-web/onboarding (rmr/request :get "/")))
  (def get-user (k-web/app (rmr/request :get "/kilo/user/99999"))))
  
(defn teardown-test []
  (k-testdb/teardown-test-db!)
  )

(defn api-test-config
  [api-tests]
  (set-up-test)
  (api-tests)
  
  (try
    (teardown-test)
    (finally (println "Kilo API test complete"))))


{'fraction_non_alphanumeric': 0.15244596131968147, 'fraction_numerical': 0.005688282138794084, 'mean_word_length': 2.9351230425055927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1856132', 'n_tokens_mistral': 679, 'n_tokens_neox': 652, 'n_words': 154}