diff --git a/README.rst b/README.rst index ed78b5fb..29cae015 100644 --- a/README.rst +++ b/README.rst @@ -56,7 +56,7 @@ Add the health checker to a URL you want to use: urlpatterns = [ # ... - url(r'^ht/', include('health_check.urls')), + path('ht/', include('health_check.urls')), ] Add the ``health_check`` applications to your ``INSTALLED_APPS``: @@ -268,7 +268,7 @@ and customizing the ``template_name``, ``get``, ``render_to_response`` and ``ren urlpatterns = [ # ... - url(r'^ht/$', views.HealthCheckCustomView.as_view(), name='health_check_custom'), + path('ht/', views.HealthCheckCustomView.as_view(), name='health_check_custom'), ] Django command diff --git a/docs/settings.rst b/docs/settings.rst index 96be9a44..c96233bf 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -33,7 +33,7 @@ Add it to your URL: urlpatterns = [ # ... - url(r'^ht/super_secret_token/'), include('health_check.urls')), + path('ht/super_secret_token/'), include('health_check.urls')), ] You can still use any uptime bot that is URL based while enjoying token protection. diff --git a/tests/test_commands.py b/tests/test_commands.py index e0149058..c7b69970 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -18,7 +18,7 @@ def check_status(self): class TestCommand: - @pytest.yield_fixture(autouse=True) + @pytest.fixture(autouse=True) def setup(self): plugin_dir.reset() plugin_dir.register(FailPlugin) diff --git a/tests/test_mixins.py b/tests/test_mixins.py index 4d5f50f4..c853e47c 100644 --- a/tests/test_mixins.py +++ b/tests/test_mixins.py @@ -20,7 +20,7 @@ class Checker(CheckMixin): class TestCheckMixin: - @pytest.yield_fixture(autouse=True) + @pytest.fixture(autouse=True) def setup(self): plugin_dir.reset() plugin_dir.register(FailPlugin) diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 6329c7ad..879d4b9d 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -15,7 +15,7 @@ def check_status(self): class TestPlugin: - @pytest.yield_fixture(autouse=True) + @pytest.fixture(autouse=True) def setup(self): plugin_dir.reset() plugin_dir.register(FakePlugin) diff --git a/tests/testapp/urls.py b/tests/testapp/urls.py index 6fc864cd..70244e44 100644 --- a/tests/testapp/urls.py +++ b/tests/testapp/urls.py @@ -1,5 +1,5 @@ -from django.urls import include, re_path +from django.urls import include, path urlpatterns = [ - re_path(r'^ht/', include('health_check.urls')), + path('ht/', include('health_check.urls')), ]