diff --git a/tests/test_check_credentials.py b/tests/test_check_credentials.py index fafd9c0e..d316f0d1 100644 --- a/tests/test_check_credentials.py +++ b/tests/test_check_credentials.py @@ -38,7 +38,7 @@ class TestMockRequest: assert isinstance(req.query_params, dict) @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_mock_request_json(self): """Test MockRequest.json() returns empty dict.""" req = MockRequest() @@ -46,7 +46,7 @@ class TestMockRequest: assert result == {} @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_mock_request_form(self): """Test MockRequest.form() returns empty dict.""" req = MockRequest() diff --git a/tests/test_views_settings.py b/tests/test_views_settings.py index 1fa4c72a..fb66ce2e 100644 --- a/tests/test_views_settings.py +++ b/tests/test_views_settings.py @@ -12,7 +12,7 @@ class TestRequireAdminAccess: """Tests for require_admin_access decorator.""" @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_redirects_non_admin_user(self): """Test that non-admin users are redirected.""" @@ -27,7 +27,7 @@ class TestRequireAdminAccess: assert result.status_code == 302 @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_redirects_when_no_user(self): """Test that unauthenticated users are redirected.""" @@ -42,7 +42,7 @@ class TestRequireAdminAccess: assert result.status_code == 302 @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_allows_admin_user(self): """Test that admin users can access the route.""" @@ -57,7 +57,7 @@ class TestRequireAdminAccess: assert result == {"success": True} @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_redirects_to_home_page(self): """Test that non-admin users are redirected to home page.""" @@ -73,7 +73,7 @@ class TestRequireAdminAccess: assert result.headers["location"] == "/" @pytest.mark.asyncio - @pytest.mark.asyncio + async def test_works_with_sync_functions(self): """Test decorator works with synchronous functions."""