From 29327fb3e68603818cdcfa55e0c666491604b132 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 21 Oct 2022 14:33:42 -0700 Subject: [PATCH] 7961 update tests --- netbox/utilities/testing/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/utilities/testing/views.py b/netbox/utilities/testing/views.py index 47197ff94..126a38087 100644 --- a/netbox/utilities/testing/views.py +++ b/netbox/utilities/testing/views.py @@ -620,6 +620,7 @@ class ViewTestCases: # do the updates on the appropriate ids prev_ids = list(self._get_queryset().values_list('id', flat=True).order_by('id')) self.assertHttpStatus(self.client.post(self._get_url('import'), data), 200) + count = self._get_queryset().count() new_ids = list(self._get_queryset().values_list('id', flat=True).order_by('id')) diff_ids = [x for x in new_ids if x not in prev_ids] start_id = diff_ids[0] @@ -632,6 +633,7 @@ class ViewTestCases: # Test POST with permission self.assertHttpStatus(self.client.post(self._get_url('import'), data), 200) + self.assertEqual(count, self._get_queryset().count()) reader = csv.DictReader(array, delimiter=',') check_data = list(reader)