File: non-case-sensitive-url-cmp.patch

package info (click to toggle)
python-requests-unixsocket 0.1.5-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 156 kB
  • ctags: 56
  • sloc: python: 248; makefile: 34
file content (33 lines) | stat: -rw-r--r-- 1,470 bytes parent folder | 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
Description: non case sensitive url comparison in tests
Forwarded: not-needed
Author: Ondřej Kobližek <koblizeko@gmail.com>

--- a/requests_unixsocket/tests/test_requests_unixsocket.py
+++ b/requests_unixsocket/tests/test_requests_unixsocket.py
@@ -34,7 +34,7 @@
             assert r.headers['X-Requested-Path'] == '/path/to/page'
             assert r.headers['X-Socket-Path'] == usock_thread.usock
             assert isinstance(r.connection, requests_unixsocket.UnixAdapter)
-            assert r.url == url
+            assert r.url.lower() == url.lower()
             if method == 'head':
                 assert r.text == ''
             else:
@@ -62,7 +62,7 @@
             assert r.headers['X-Requested-Query-String'] == 'timestamp=true'
             assert r.headers['X-Socket-Path'] == usock_thread.usock
             assert isinstance(r.connection, requests_unixsocket.UnixAdapter)
-            assert r.url == url
+            assert r.url.lower() == url.lower()
             if method == 'head':
                 assert r.text == ''
             else:
@@ -110,7 +110,7 @@
                 assert r.headers['X-Socket-Path'] == usock_thread.usock
                 assert isinstance(r.connection,
                                   requests_unixsocket.UnixAdapter)
-                assert r.url == url
+                assert r.url.lower() == url.lower()
                 if method == 'head':
                     assert r.text == ''
                 else: