def test_filter_issues_by_score_and_createdTime_startDate_endDate(self):
    self.client.force_authenticate(user=get_user_model().objects.get(username='app_owner_user'))
    response = self.client.get(reverse('issues-list'), {'score': 5, 'appId': 1})
    self.assertEqual(self._get_response_total(response), 1)
    response = self.client.get(reverse('issues-list'), {'score': 4, 'appId': 2})
    self.assertEqual(self._get_response_total(response), 1)
    response = self.client.get(reverse('issues-list'), {'score': 5, 'appId': 2})
    self.assertEqual(self._get_response_total(response), 0)
    response = self.client.get(reverse('issues-list'), {'score': 4, 'appId': 2, 'createdTime': '2017-07-01'})
    self.assertEqual(self._get_response_total(response), 0)
    response = self.client.get(reverse('issues-list'), {'score': 4, 'appId': 2, 'createdTime': '2017-06-29'})
    self.assertEqual(self._get_response_total(response), 1)
    response = self.client.get(reverse('issues-list'), {'score': 5, 'appId': 1, 'createdTime': '2017-07-01'})
    self.assertEqual(self._get_response_total(response), 0)
    response = self.client.get(reverse('issues-list'), {'appId': 6, 'startDate': '2017-06-29', 'endDate': '2017-10-01'})
    self.assertEqual(self._get_response_total(response), 7)
    response = self.client.get(reverse('issues-list'), {'appId': 6, 'startDate': '2017-06-29', 'endDate': '2017-08-01'})
    self.assertEqual(self._get_response_total(response), 5)
def test_filter_issues_by_score_and_createdTime_startDate_endDate(self):
    self.client.force_authenticate(user=get_user_model().objects.get(username='app_owner_user'))
    response = self.client.get(reverse('issues-list'), {'score': 5, 'appId': 1})
    self.assertEqual(self._get_response_total(response), 1)
    response = self.client.get(reverse('issues-list'), {'score': 4, 'appId': 2})
    self.assertEqual(self._get_response_total(response), 1)
    response = self.client.get(reverse('issues-list'), {'score': 5, 'appId': 2})
    self.assertEqual(self._get_response_total(response), 0)
    response = self.client.get(reverse('issues-list'), {'score': 4, 'appId': 2, 'createdTime': '2017-07-01'})
    self.assertEqual(self._get_response_total(response), 0)
    response = self.client.get(reverse('issues-list'), {'score': 4, 'appId': 2, 'createdTime': '2017-06-29'})
    self.assertEqual(self._get_response_total(response), 1)
    response = self.client.get(reverse('issues-list'), {'score': 5, 'appId': 1, 'createdTime': '2017-07-01'})
    self.assertEqual(self._get_response_total(response), 0)
    response = self.client.get(reverse('issues-list'), {'appId': 6, 'startDate': '2017-06-29', 'endDate': '2017-10-01'})
    self.assertEqual(self._get_response_total(response), 7)
    response = self.client.get(reverse('issues-list'), {'appId': 6, 'startDate': '2017-06-29', 'endDate': '2017-08-01'})
    self.assertEqual(self._get_response_total(response), 5)