QC check
This commit is contained in:
@@ -24,8 +24,8 @@ class TestAdminAPI:
|
||||
|
||||
assert response.status_code == 403
|
||||
assert (
|
||||
"Access denied" in response.json()["detail"]
|
||||
or "admin" in response.json()["detail"].lower()
|
||||
"Access denied" in response.json()["detail"]
|
||||
or "admin" in response.json()["detail"].lower()
|
||||
)
|
||||
|
||||
def test_toggle_user_status_admin(self, client, admin_headers, test_user):
|
||||
@@ -48,7 +48,7 @@ class TestAdminAPI:
|
||||
assert "User not found" in response.json()["detail"]
|
||||
|
||||
def test_toggle_user_status_cannot_deactivate_self(
|
||||
self, client, admin_headers, test_admin
|
||||
self, client, admin_headers, test_admin
|
||||
):
|
||||
"""Test that admin cannot deactivate their own account"""
|
||||
response = client.put(
|
||||
@@ -79,8 +79,8 @@ class TestAdminAPI:
|
||||
|
||||
assert response.status_code == 403
|
||||
assert (
|
||||
"Access denied" in response.json()["detail"]
|
||||
or "admin" in response.json()["detail"].lower()
|
||||
"Access denied" in response.json()["detail"]
|
||||
or "admin" in response.json()["detail"].lower()
|
||||
)
|
||||
|
||||
def test_verify_shop_admin(self, client, admin_headers, test_shop):
|
||||
@@ -120,7 +120,7 @@ class TestAdminAPI:
|
||||
assert "Shop not found" in response.json()["detail"]
|
||||
|
||||
def test_get_marketplace_import_jobs_admin(
|
||||
self, client, admin_headers, test_marketplace_job
|
||||
self, client, admin_headers, test_marketplace_job
|
||||
):
|
||||
"""Test admin getting marketplace import jobs"""
|
||||
response = client.get(
|
||||
@@ -136,7 +136,7 @@ class TestAdminAPI:
|
||||
assert test_marketplace_job.id in job_ids
|
||||
|
||||
def test_get_marketplace_import_jobs_with_filters(
|
||||
self, client, admin_headers, test_marketplace_job
|
||||
self, client, admin_headers, test_marketplace_job
|
||||
):
|
||||
"""Test admin getting marketplace import jobs with filters"""
|
||||
response = client.get(
|
||||
@@ -160,8 +160,8 @@ class TestAdminAPI:
|
||||
|
||||
assert response.status_code == 403
|
||||
assert (
|
||||
"Access denied" in response.json()["detail"]
|
||||
or "admin" in response.json()["detail"].lower()
|
||||
"Access denied" in response.json()["detail"]
|
||||
or "admin" in response.json()["detail"].lower()
|
||||
)
|
||||
|
||||
def test_admin_pagination_users(self, client, admin_headers, test_user, test_admin):
|
||||
|
||||
Reference in New Issue
Block a user