Skip to content

Commit

Permalink
🚧 removing inspector files
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-maykin committed Sep 6, 2024
1 parent fae57f2 commit 236822a
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 972 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ install_requires =
django-filter>=2.0
django-solo
djangorestframework>=3.11.0
djangorestframework-gis>=1.0
djangorestframework_camel_case>=1.2.0
django-rest-framework-condition
drf-extra-fields>=3.7.0
Expand Down
2 changes: 1 addition & 1 deletion testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": os.getenv("PGDATABASE", "vng_api_common"),
"USER": os.getenv("DB_USER", "postgres"),
"PASSWORD": os.getenv("DB_PASSWORD", ""),
Expand Down
295 changes: 0 additions & 295 deletions tests/test_cache_headers.py

This file was deleted.

18 changes: 11 additions & 7 deletions tests/test_field_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Meta:

class LengthHyperLinkedSerializer(serializers.ModelSerializer):
poly = LengthHyperlinkedRelatedField(
view_name="poly-detail",
view_name="field_extention_poly-detail",
lookup_field="uuid",
queryset=Poly.objects,
min_length=20,
Expand Down Expand Up @@ -64,16 +64,20 @@ class LengthHyperLinkedViewSet(viewsets.ModelViewSet):


class HyperlinkedIdentityViewSet(viewsets.ModelViewSet):
queryset = Poly.objects.all()
queryset = FkModel.objects.all()
serializer_class = HyperlinkedIdentityFieldSerializer


app_name = "field_extensions"

router = routers.DefaultRouter(trailing_slash=False)
router.register("base64", Base64ViewSet)
router.register("length", LengthHyperLinkedViewSet)
router.register("identity", HyperlinkedIdentityViewSet)
router.register("base64", Base64ViewSet, basename="field_extensions_base64")
router.register("length", LengthHyperLinkedViewSet, basename="field_extensions_length")
router.register(
"identity", HyperlinkedIdentityViewSet, basename="field_extensions_identity"
)

router.register("poly", PolyView)
router.register("poly", PolyView, basename="field_extensions_poly")

urlpatterns = [
path("api/", include(router.urls)),
Expand Down Expand Up @@ -112,7 +116,7 @@ def test_read_only():

assert "name" not in path["MediaFileModel"]["properties"]

assert "name" not in path["PatchedMediaFileModel"]["properties"]["name"]
assert "name" not in path["PatchedMediaFileModel"]["properties"]


def test_hyper_link_related_field():
Expand Down
4 changes: 3 additions & 1 deletion tests/test_filter_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ class FkModelViewSet(viewsets.ModelViewSet):
]


app_name = "filter_extensions"

router = routers.DefaultRouter(trailing_slash=False)
router.register("camilize", FkModelViewSet)
router.register("camilize", FkModelViewSet, basename="filter_extensions_camilize")


urlpatterns = [
Expand Down
Loading

0 comments on commit 236822a

Please sign in to comment.