Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nadzyah committed Jun 19, 2023
1 parent e959071 commit 1549585
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions backend/tests/controllers/families/test_families.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@
from random import randint

from fastapi.testclient import TestClient
from requests_mock import Mocker
from sqlalchemy.orm import Session

from tests.helpers import create_artefact


def test_retreive_family(
db_session: Session, test_client: TestClient, requests_mock: Mocker
):
def test_retreive_family(db_session: Session, test_client: TestClient):
"""
We should get json for a specific family with its stages and artefacts
"""
Expand All @@ -52,15 +49,15 @@ def test_retreive_family(
version=str(randint(1, 100)),
)
)
stage = artefacts[0].stage
snap_stage = artefacts[0].stage

# Act
response = test_client.get("/v1/families/snap")

# Assert
assert response.json() == {
"id": stage.family_id,
"name": stage.family.name,
"id": snap_stage.family_id,
"name": snap_stage.family.name,
"stages": [
{
"id": 1,
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from test_observer.data_access.models_enums import FamilyName


def create_artefact(db_session: Session, stage_name: str, **kwargs):
def create_artefact(db_session: Session, stage_name: str, **kwargs) -> Artefact:
"""Create a dummy artefact"""
stage = db_session.query(Stage).filter(Stage.name == stage_name).first()
artefact = Artefact(
Expand Down

0 comments on commit 1549585

Please sign in to comment.