test: add perf test to prevent adding more redis calls
This commit is contained in:
parent
cbb39d463a
commit
51b11208e4
1 changed files with 7 additions and 1 deletions
|
|
@ -291,9 +291,15 @@ class TestOverheadCalls(FrappeAPITestCase):
|
|||
|
||||
def test_ping_overheads(self):
|
||||
self.get(self.method("ping"), {"sid": "Guest"})
|
||||
with self.assertRedisCallCounts(13), self.assertQueryCount(self.BASE_SQL_CALLS):
|
||||
with self.assertRedisCallCounts(10), self.assertQueryCount(self.BASE_SQL_CALLS):
|
||||
self.get(self.method("ping"), {"sid": "Guest"})
|
||||
|
||||
def test_ping_overheads_authenticated(self):
|
||||
sid = self.sid
|
||||
self.get(self.method("ping"), {"sid": sid})
|
||||
with self.assertRedisCallCounts(10), self.assertQueryCount(self.BASE_SQL_CALLS):
|
||||
self.get(self.method("ping"), {"sid": sid})
|
||||
|
||||
def test_list_view_overheads(self):
|
||||
sid = self.sid
|
||||
self.get(self.resource("ToDo"), {"sid": sid})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue