added a test case, updated coverage file

This commit is contained in:
abutalib-kiwi
2023-09-12 23:08:17 +05:30
parent af06dddbeb
commit 08f54f28a4
8 changed files with 253 additions and 255 deletions
+16
View File
@@ -49,6 +49,22 @@ class AnalyticsViewSetTestCase(AnalyticsSetUp):
# Assuming four users exists in the database
self.assertEqual(response.data['data'][0]['signups'], 4)
def test_new_user_sign_ups_between_given_dates(self):
"""
test new user sign-ups
:return:
"""
self.client.force_authenticate(self.admin_user)
url = reverse('web_admin:analytics-new-signups')
query_params = {
'start_date': '2023-09-12',
'end_date': '2023-09-13'
}
response = self.client.get(url, query_params)
self.assertEqual(response.status_code, status.HTTP_200_OK)
# Assuming four users exists in the database
self.assertEqual(response.data['data'][0]['signups'], 4)
def test_assign_tasks_report(self):
"""
test assign tasks report