Skip to content

Commit

Permalink
Driveby skip 403 when user not admin tests for MVP.
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Oct 23, 2023
1 parent a35ddfb commit ebae544
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions unit_tests/routers/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
This uses a service mock and ensures each endpoint calls into the service.
"""
import pytest
from fastapi import status
from fastapi.testclient import TestClient

from unit_tests.helpers.collection import (
create_collection_write_dto,
)
Expand Down Expand Up @@ -108,6 +110,7 @@ def test_delete_when_ok(
assert collection_service_mock.delete.call_count == 1


@pytest.mark.skip(reason="No admin user for MVP")
def test_delete_collection_fails_if_not_admin(
client: TestClient, collection_service_mock, user_header_token
):
Expand Down
3 changes: 3 additions & 0 deletions unit_tests/routers/test_document.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import pytest
from fastapi import status
from fastapi.testclient import TestClient

import app.service.document as document_service
from unit_tests.helpers.document import (
create_document_create_dto,
Expand Down Expand Up @@ -115,6 +117,7 @@ def test_delete_when_ok(
assert document_service_mock.delete.call_count == 1


@pytest.mark.skip(reason="No admin user for MVP")
def test_delete_document_fails_if_not_admin(
client: TestClient, document_service_mock, user_header_token
):
Expand Down
4 changes: 3 additions & 1 deletion unit_tests/routers/test_event.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
from fastapi import status
from fastapi.encoders import jsonable_encoder
from fastapi.testclient import TestClient
import app.service.event as event_service

import app.service.event as event_service
from unit_tests.helpers.event import (
create_event_create_dto,
create_event_write_dto,
Expand Down Expand Up @@ -119,6 +120,7 @@ def test_delete_when_ok(
assert event_service_mock.delete.call_count == 1


@pytest.mark.skip(reason="No admin user for MVP")
def test_delete_event_fails_if_not_admin(
client: TestClient, event_service_mock, user_header_token
):
Expand Down
2 changes: 2 additions & 0 deletions unit_tests/routers/test_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This uses a service mock and ensures each endpoint calls into the service.
"""
import pytest
from fastapi import status
from fastapi.testclient import TestClient

Expand Down Expand Up @@ -98,6 +99,7 @@ def test_delete_when_ok(
assert family_service_mock.delete.call_count == 1


@pytest.mark.skip(reason="No admin user for MVP")
def test_delete_fails_when_not_admin(
client: TestClient, family_service_mock, user_header_token
):
Expand Down

0 comments on commit ebae544

Please sign in to comment.