mirror of https://github.com/zulip/zulip.git
Fix ChangeSettingsTest caching issue causing test failures.
This commit is contained in:
parent
06079042d4
commit
10dd9addb7
|
@ -966,11 +966,14 @@ class ChangeSettingsTest(AuthedTestCase):
|
||||||
json_result = self.client.post(pattern,
|
json_result = self.client.post(pattern,
|
||||||
{param: ujson.dumps(True)})
|
{param: ujson.dumps(True)})
|
||||||
self.assert_json_success(json_result)
|
self.assert_json_success(json_result)
|
||||||
|
# refetch user_profile object to correctly handle caching
|
||||||
|
user_profile = get_user_profile_by_email("hamlet@zulip.com")
|
||||||
self.assertEqual(getattr(user_profile, param), True)
|
self.assertEqual(getattr(user_profile, param), True)
|
||||||
|
|
||||||
json_result = self.client.post(pattern,
|
json_result = self.client.post(pattern,
|
||||||
{param: ujson.dumps(False)})
|
{param: ujson.dumps(False)})
|
||||||
self.assert_json_success(json_result)
|
self.assert_json_success(json_result)
|
||||||
|
# refetch user_profile object to correctly handle caching
|
||||||
user_profile = get_user_profile_by_email("hamlet@zulip.com")
|
user_profile = get_user_profile_by_email("hamlet@zulip.com")
|
||||||
self.assertEqual(getattr(user_profile, param), False)
|
self.assertEqual(getattr(user_profile, param), False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue