Package: pantomime-clojure / 2.1.0+dfsg-2

disable-network-tests.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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"))