mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-18 20:50:10 +01:00
index: fix no JAR test case that fails on example.org
http://example.org/index-v1.jar now returns the HTTP header "Content-Encoding: gzip" but then the reply is plain HTML. That triggers a ContentDecodingError instead of an HTTPError, so this changes the test to success on any RequestsException.
This commit is contained in:
parent
25de42055e
commit
5fb368916f
@ -71,7 +71,7 @@ class IndexTest(unittest.TestCase):
|
||||
fdroidserver.index.download_repo_index("http://example.org")
|
||||
|
||||
def test_download_repo_index_no_jar(self):
|
||||
with self.assertRaises(requests.exceptions.HTTPError):
|
||||
with self.assertRaises(requests.exceptions.RequestException):
|
||||
fdroidserver.index.download_repo_index("http://example.org?fingerprint=nope")
|
||||
|
||||
@patch('requests.head')
|
||||
|
Loading…
Reference in New Issue
Block a user