Skip to content

Commit

Permalink
[tests] Improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryamanz29 committed Apr 7, 2023
1 parent ee25e06 commit fd1d3ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testapp/tests/test_filter_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def setUp(self):

def _assert_django_filters_shelf_options(self, response, shelf_a, shelf_b):
self.assertEqual(response.data[0]['id'], str(shelf_a.id))
self.assertNotContains(response, str(shelf_b.id))
# make sure only correct organization is
# visible in the django filters select options
self.assertContains(response, 'org_a</option>')
Expand All @@ -64,6 +63,7 @@ def _assert_django_filters_shelf_options(self, response, shelf_a, shelf_b):
html=True,
)
self.assertContains(response, 'test-tag-a</option>')
self.assertNotContains(response, str(shelf_b.id))
self.assertNotContains(response, 'org_b</option>')
self.assertNotContains(response, 'default</option>')
self.assertNotContains(response, 'test-shelf-a</option>')
Expand Down Expand Up @@ -353,6 +353,7 @@ def test_django_filters_by_field_other_than_organization(self):
# ensure that only the 'books' belonging to 'org1'
# are visible in the django-filters select options
self.assertContains(response, 'book_org1</option>')
self.assertNotContains(response, 'book_org2</option>')
self.assertNotContains(response, 'org2</option>')
self.assertNotContains(response, 'default</option>')
self.assertNotContains(response, 'lib1</option>')
Expand Down

0 comments on commit fd1d3ea

Please sign in to comment.