Browse Source

Simplify test for statistics API

pull/527/head
Clemens Wolff 4 years ago
parent
commit
43146e2ecb
1 changed files with 2 additions and 4 deletions
  1. 6
      app/api/tests/test_api.py

6
app/api/tests/test_api.py

@ -1332,10 +1332,8 @@ class TestStatisticsAPI(APITestCase):
self.client.login(username=self.super_user_name,
password=self.super_user_pass)
response = self.client.get(self.url, format='json')
total = self.doc.count()
remaining = self.doc.filter(doc_annotations__isnull=True).count()
self.assertEqual(response.data['total'], total)
self.assertEqual(response.data['remaining'], remaining)
self.assertEqual(response.data['total'], 2)
self.assertEqual(response.data['remaining'], 1)
def test_returns_user_count(self):
self.client.login(username=self.super_user_name,

Loading…
Cancel
Save