mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
test_classes: Use realistic web and mobile User-Agent strings.
This fixes a confusing aspect of how our automated tests worked previously, where we'd almost all HTTP requests in the unlikely configuration with no User-Agent string specified. We need to adjust query counts in a few tests that now are a bit cheaper because they now can take advantage of a Client object created in server_initialization.py in `process_client`.
This commit is contained in:
@@ -78,7 +78,7 @@ class CompatibilityTest(ZulipTestCase):
|
||||
'''.strip().split('\n') if case]
|
||||
|
||||
def test_compatibility_without_user_agent(self) -> None:
|
||||
result = self.client_get("/compatibility")
|
||||
result = self.client_get("/compatibility", skip_user_agent=True)
|
||||
self.assert_json_error(result, 'User-Agent header missing from request')
|
||||
|
||||
def test_compatibility(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user