Skip to content

Commit

Permalink
[Fixes #12713] Usage of permissions registry, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Jan 13, 2025
1 parent 822b7bc commit 7e0f900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/upload/tests/end2end/test_end2end.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _assertimport(

# check if the dynamic model is created
if os.getenv("IMPORTER_ENABLE_DYN_MODELS", False):
_schema_id = ModelSchema.objects.filter(name__icontains=initial_name)
_schema_id = ModelSchema.objects.filter(name__icontains=initial_name.lower().replace(' ', '_'))

Check warning on line 133 in geonode/upload/tests/end2end/test_end2end.py

View check run for this annotation

Codecov / codecov/patch

geonode/upload/tests/end2end/test_end2end.py#L133

Added line #L133 was not covered by tests
self.assertTrue(_schema_id.exists())
schema_entity = _schema_id.first()
self.assertTrue(FieldSchema.objects.filter(model_schema=schema_entity).exists())
Expand All @@ -141,7 +141,7 @@ def _assertimport(

# check if the geonode resource exists
resource = ResourceBase.objects.filter(
Q(alternate__icontains=f"geonode:{initial_name}") | Q(alternate__icontains=initial_name)
Q(alternate__icontains=f"geonode:{initial_name.lower().replace(' ', '_')}") | Q(alternate__icontains=initial_name.lower().replace(' ', '_'))
)
self.assertTrue(resource.exists())

Expand Down

0 comments on commit 7e0f900

Please sign in to comment.