fix(tests): remove duplicate pytest.mark.asyncio decorators
- Remove duplicate asyncio markers from test_views_settings.py - Remove duplicate asyncio markers from test_check_credentials.py - Remove duplicate asyncio markers from test_views_status.py Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user