mirror of https://github.com/zulip/zulip.git
test_presence: Change assert_max_length to assert_length.
This commit is contained in:
parent
cc96cefe75
commit
1b8d9f186e
|
@ -23,6 +23,7 @@ from zerver.models import (
|
||||||
UserActivity,
|
UserActivity,
|
||||||
UserProfile,
|
UserProfile,
|
||||||
UserPresence,
|
UserPresence,
|
||||||
|
flush_per_request_caches,
|
||||||
)
|
)
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -44,10 +45,11 @@ class ActivityTest(ZulipTestCase):
|
||||||
count=count,
|
count=count,
|
||||||
last_visit=last_visit
|
last_visit=last_visit
|
||||||
)
|
)
|
||||||
|
flush_per_request_caches()
|
||||||
with queries_captured() as queries:
|
with queries_captured() as queries:
|
||||||
self.client_get('/activity')
|
self.client_get('/activity')
|
||||||
|
|
||||||
self.assert_max_length(queries, 13)
|
self.assert_length(queries, 2)
|
||||||
|
|
||||||
class TestClientModel(ZulipTestCase):
|
class TestClientModel(ZulipTestCase):
|
||||||
def test_client_stringification(self):
|
def test_client_stringification(self):
|
||||||
|
|
Loading…
Reference in New Issue