mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-09 08:50:28 +03:00
Add timeout argument to requests.(get,post)
This commit is contained in:
parent
cf0100cf11
commit
c89a9f0e8b
11 changed files with 23 additions and 15 deletions
|
|
@ -33,7 +33,7 @@ class NightlyTest(unittest.TestCase):
|
|||
]:
|
||||
url = nightly.get_repo_base_url(clone_url, repo_git_base)
|
||||
self.assertEqual(result, url)
|
||||
r = requests.head(os.path.join(url, 'repo/index-v1.jar'))
|
||||
r = requests.head(os.path.join(url, 'repo/index-v1.jar'), timeout=300)
|
||||
# gitlab.com often returns 403 Forbidden from their cloudflare restrictions
|
||||
self.assertTrue(r.status_code in (200, 403), 'should not be a redirect')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue