def test_create_issues_with_updated_after(self):
    self.client.force_authenticate(user=get_user_model().objects.get(username='app_owner_user'))
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': '1987-01-01 10:13:20'})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 2)
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': '2030-01-01 10:13:20'})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 0)
    date_time = '2017-06-29 20:25:00'
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': date_time})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 0)
    issue = Issue.objects.get(pk=1)
    issue.save()
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': date_time})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 1)
def test_create_issues_with_updated_after(self):
    self.client.force_authenticate(user=get_user_model().objects.get(username='app_owner_user'))
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': '1987-01-01 10:13:20'})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 2)
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': '2030-01-01 10:13:20'})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 0)
    date_time = '2017-06-29 20:25:00'
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': date_time})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 0)
    issue = Issue.objects.get(pk=1)
    issue.save()
    response = self.client.get(reverse('issues-list'), {'appId': 1, 'updatedAfter': date_time})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    self.assertEqual(self._get_response_total(response), 1)