Author: Apollon Oikonomopoulos <apoikos@debian.org>
Description: Disable tests requiring network access during build
Last-Update: 2017-08-28
Forwarded: no (debian-specific)
--- a/test/pantomime/test/mime_test.clj
+++ b/test/pantomime/test/mime_test.clj
@@ -1,6 +1,6 @@
 (ns pantomime.test.mime-test
   (:require [clojure.java.io :as io]
-            [clj-http.client :as http]
+            ;;[clj-http.client :as http]
             [pantomime.mime  :refer :all]
             [clojure.test    :refer :all])
   (:import [java.io File FileInputStream]
@@ -45,13 +45,14 @@
          "text/plain"               (io/input-stream (io/resource "application/javascript/mootools.compressed.js"))
          "application/javascript"   (io/as-file (io/resource "application/javascript/mootools.compressed.js")))))
 
-(deftest test-http-response-content-type-detection
-  (are [url expected-mime] (let [{:keys [^String body headers status]} (http/get url)]
-                             (is (= 200 status))
-                             (is (= expected-mime (mime-type-of (.getBytes body)))))
-       "https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf"              "application/pdf"
-       "http://github.com/robots.txt"                                        "text/plain"
-       "http://www.amazon.com/sitemap-manual-index.xml"                      "application/xml"
-       "http://docs.oracle.com/javase/7/docs/index.html"                     "application/xhtml+xml"
-       "http://upload.wikimedia.org/wikipedia/commons/9/9a/PNG_transparency_demonstration_2.png" "application/octet-stream"
-       "http://upload.wikimedia.org/wikipedia/commons/e/e9/Felis_silvestris_silvestris_small_gradual_decrease_of_quality.png" "application/octet-stream"))
+;; Debian: disabled during build
+;; (deftest test-http-response-content-type-detection
+;;   (are [url expected-mime] (let [{:keys [^String body headers status]} (http/get url)]
+;;                              (is (= 200 status))
+;;                              (is (= expected-mime (mime-type-of (.getBytes body)))))
+;;        "https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf"              "application/pdf"
+;;        "http://github.com/robots.txt"                                        "text/plain"
+;;        "http://www.amazon.com/sitemap-manual-index.xml"                      "application/xml"
+;;        "http://docs.oracle.com/javase/7/docs/index.html"                     "application/xhtml+xml"
+;;        "http://upload.wikimedia.org/wikipedia/commons/9/9a/PNG_transparency_demonstration_2.png" "application/octet-stream"
+;;        "http://upload.wikimedia.org/wikipedia/commons/e/e9/Felis_silvestris_silvestris_small_gradual_decrease_of_quality.png" "application/octet-stream"))
--- a/test/pantomime/test/web_test.clj
+++ b/test/pantomime/test/web_test.clj
@@ -1,21 +1,22 @@
 (ns pantomime.test.web-test
   (:require [clojure.java.io :as io]
-            [clj-http.client :as http]
+            ;;[clj-http.client :as http]
             [clojure.test  :refer :all]
             [pantomime.web :refer :all]))
 
 
 
-(deftest test-unified-http-response-content-type-detection
-  (are [url expected-mime] (let [{:keys [^String body headers status]} (http/get url)]
-                             (is (= 200 status))
-                             (is (= expected-mime
-                                    (mime-type-of (.getBytes body) headers)
-                                    (mime-type-of body headers))))
-       "http://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf" "application/pdf"
-       "http://github.com/robots.txt"                          "text/plain"
-       "http://www.amazon.com/sitemap-manual-index.xml"        "application/xml"
-       "http://docs.oracle.com/javase/7/docs/index.html"       "application/xhtml+xml"
-       "http://upload.wikimedia.org/wikipedia/commons/9/9a/PNG_transparency_demonstration_2.png" "image/png"
-       "http://creativecommons.org/images/deed/cc-logo.jpg" "image/jpeg"
-       "http://elpais.com.uy/formatos/rss/index.asp?seccion=umomento" "application/rss+xml"))
+;; Debian: disabled during build
+;;(deftest test-unified-http-response-content-type-detection
+;;  (are [url expected-mime] (let [{:keys [^String body headers status]} (http/get url)]
+;;                             (is (= 200 status))
+;;                             (is (= expected-mime
+;;                                    (mime-type-of (.getBytes body) headers)
+;;                                    (mime-type-of body headers))))
+;;       "http://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf" "application/pdf"
+;;       "http://github.com/robots.txt"                          "text/plain"
+;;       "http://www.amazon.com/sitemap-manual-index.xml"        "application/xml"
+;;       "http://docs.oracle.com/javase/7/docs/index.html"       "application/xhtml+xml"
+;;       "http://upload.wikimedia.org/wikipedia/commons/9/9a/PNG_transparency_demonstration_2.png" "image/png"
+;;       "http://creativecommons.org/images/deed/cc-logo.jpg" "image/jpeg"
+;;       "http://elpais.com.uy/formatos/rss/index.asp?seccion=umomento" "application/rss+xml"))
