Skip to content

Commit

Permalink
Merge branch 'add-store-tests' of https://github.com/Clinical-Genomic…
Browse files Browse the repository at this point in the history
…s/genotype-api into add-store-tests
  • Loading branch information
ChrOertlin committed Apr 10, 2024
2 parents 415beb9 + 23ccd4a commit 91b57ff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/database/crud/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def test_get_analyses_by_type_between_dates(
date_two_weeks_future: date,
helpers: StoreHelpers,
):
# GIVEN an analysis and a store with the analysis and the same analysis type with a different date
# GIVEN a store with two analyses of the same type but different dates
future_analysis: Analysis = test_analysis
future_analysis.created_at = date_two_weeks_future
helpers.ensure_analysis(store=base_store, analysis=future_analysis)

# WHEN getting the analyses by type between dates
# WHEN getting the analyses by type between dates excluding one of the analyses
analyses: list[Analysis] = base_store.get_analyses_by_type_between_dates(
analysis_type=test_analysis.type, date_min=date_yesterday, date_max=date_tomorrow
)
Expand All @@ -87,7 +87,7 @@ def test_get_analyses_by_type_between_dates(


def test_get_plate_by_id(base_store: Store, test_plate: Plate):
# GIVEN a plate and a store with the plate
# GIVEN a store with a plate

# WHEN getting the plate by id
plate: Plate = base_store.get_plate_by_id(plate_id=test_plate.id)
Expand All @@ -97,7 +97,7 @@ def test_get_plate_by_id(base_store: Store, test_plate: Plate):


def test_get_plate_by_plate_id(base_store: Store, test_plate: Plate):
# GIVEN a plate and a store with the plate
# GIVEN a store with a plate

# WHEN getting the plate by plate id
plate: Plate = base_store.get_plate_by_plate_id(plate_id=test_plate.plate_id)
Expand All @@ -107,7 +107,7 @@ def test_get_plate_by_plate_id(base_store: Store, test_plate: Plate):


def get_user_by_id(base_store: Store, test_user: User):
# GIVEN a user and a store with the user
# GIVEN a store with a user

# WHEN getting the user by id
user: User = base_store.get_user_by_id(user_id=test_user.id)
Expand All @@ -117,7 +117,7 @@ def get_user_by_id(base_store: Store, test_user: User):


def get_user_by_email(base_store: Store, test_user: User):
# GIVEN a user and a store with the user
# GIVEN a store with a user

# WHEN getting the user by email
user: User = base_store.get_user_by_email(email=test_user.email)
Expand Down

0 comments on commit 91b57ff

Please sign in to comment.