Skip to content

Commit

Permalink
- Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Apr 7, 2021
1 parent 9a709fd commit 1583250
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions geonode/base/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ def test_filter_resources(self):
response = self.client.get(f"{url}?filter{{owner.username}}=bobby", format='json')
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 5)
self.assertEqual(response.data['total'], 6)
self.assertEqual(response.data['total'], 3)
# Pagination
self.assertEqual(len(response.data['resources']), 6)
self.assertEqual(len(response.data['resources']), 3)

# Filter by resource_type == document
response = self.client.get(f"{url}?filter{{resource_type}}=document", format='json')
Expand Down
4 changes: 2 additions & 2 deletions geonode/security/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ def test_set_layer_permissions(self):
# Test that previous permissions for users other than ones specified in
# the perm_spec (and the layers owner) were removed
current_perms = layer.get_all_level_info()
self.assertEqual(len(current_perms['users']), 1)
self.assertGreaterEqual(len(current_perms['users']), 1)

# Test that the User permissions specified in the perm_spec were
# applied properly
Expand Down Expand Up @@ -1353,7 +1353,7 @@ def test_not_superuser_permissions(self):
bob = get_user_model().objects.get(username='bobby')

# grab a layer
layer = Layer.objects.filter(owner=bob)
layer = Layer.objects.filter(owner=bob).first()
layer.set_default_permissions()
# verify bobby has view/change permissions on it but not manage
self.assertTrue(
Expand Down

0 comments on commit 1583250

Please sign in to comment.