mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-25 01:07:56 +00:00
added a test case, updated coverage file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user