* Check for zstd support in the testsuite. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twython?expand=0&rev=9
20 lines
729 B
Diff
20 lines
729 B
Diff
Index: twython-3.9.1/tests/test_core.py
|
|
===================================================================
|
|
--- twython-3.9.1.orig/tests/test_core.py
|
|
+++ twython-3.9.1/tests/test_core.py
|
|
@@ -285,7 +285,13 @@ class TwythonAPITestCase(unittest.TestCa
|
|
|
|
self.api.get(endpoint)
|
|
|
|
- self.assertEqual(b'gzip, deflate', responses.calls[0].request.headers['Accept-Encoding'])
|
|
+ accept_encoding = b'gzip, deflate'
|
|
+ try:
|
|
+ import compression.zstd
|
|
+ accept_encoding += b', zstd'
|
|
+ except ImportError:
|
|
+ pass
|
|
+ self.assertEqual(accept_encoding, responses.calls[0].request.headers['Accept-Encoding'])
|
|
|
|
# Static methods
|
|
def test_construct_api_url(self):
|