Skip to content

Commit

Permalink
Fix tests accordinly
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Oct 29, 2024
1 parent 29e95e5 commit 5262c88
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/src/chanjo2/endpoints/test_intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from chanjo2.constants import MULTIPLE_PARAMS_NOT_SUPPORTED_MSG
from chanjo2.meta.handle_bed import resource_lines
from chanjo2.models.pydantic_models import Builds, Exon, Gene, Transcript
from chanjo2.models.pydantic_models import Builds, ExonBase, GeneBase, TranscriptBase
from chanjo2.populate_demo import (
BUILD_EXONS_RESOURCE,
BUILD_GENES_RESOURCE,
Expand Down Expand Up @@ -53,7 +53,7 @@ def test_load_genes(
# THEN the expected number of genes should be returned
assert len(result) == nr_genes
# AND the gene should have the right format
assert Gene(**result[0])
assert GeneBase(**result[0])


@pytest.mark.parametrize("build, path", BUILD_GENES_RESOURCE)
Expand Down Expand Up @@ -86,7 +86,7 @@ def test_load_genes_from_file(
assert len(result) == nr_genes

# THEN the gene should have the right format
assert Gene(**result[0])
assert GeneBase(**result[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_genes_by_ensembl_ids(
assert response.status_code == status.HTTP_200_OK
result = response.json()
assert len(result) == len(genomic_ids_per_build[build]["ensembl_gene_ids"])
assert Gene(**result[0])
assert GeneBase(**result[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -155,7 +155,7 @@ def test_genes_by_hgnc_ids(
assert response.status_code == status.HTTP_200_OK
result = response.json()
assert len(result) == len(genomic_ids_per_build[build]["hgnc_ids"])
assert Gene(**result[0])
assert GeneBase(**result[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -178,7 +178,7 @@ def test_genes_by_hgnc_symbols(
assert response.status_code == status.HTTP_200_OK
result = response.json()
assert len(result) == len(genomic_ids_per_build[build]["hgnc_symbols"])
assert Gene(**result[0])
assert GeneBase(**result[0])


@pytest.mark.parametrize("build, path", BUILD_TRANSCRIPTS_RESOURCE)
Expand Down Expand Up @@ -279,7 +279,7 @@ def test_transcripts_no_filters(
# THEN transcript objects should be returned
assert response.status_code == status.HTTP_200_OK
transcripts = response.json()
assert Transcript(**transcripts[0])
assert TranscriptBase(**transcripts[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -302,7 +302,7 @@ def test_transcripts_by_ensembl_ids(
# THEN transcript objects should be returned
assert response.status_code == status.HTTP_200_OK
transcripts = response.json()
assert Transcript(**transcripts[0])
assert TranscriptBase(**transcripts[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -325,7 +325,7 @@ def test_transcripts_by_ensembl_gene_ids(
# THEN transcript objects should be returned
assert response.status_code == status.HTTP_200_OK
transcripts = response.json()
assert Transcript(**transcripts[0])
assert TranscriptBase(**transcripts[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -348,7 +348,7 @@ def test_transcripts_by_hgnc_ids(
# THEN transcript objects should be returned
assert response.status_code == status.HTTP_200_OK
transcripts = response.json()
assert Transcript(**transcripts[0])
assert TranscriptBase(**transcripts[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -371,7 +371,7 @@ def test_transcripts_by_hgnc_symbols(
# THEN transcript objects should be returned
assert response.status_code == status.HTTP_200_OK
transcripts = response.json()
assert Transcript(**transcripts[0])
assert TranscriptBase(**transcripts[0])


@pytest.mark.parametrize("build, path", BUILD_EXONS_RESOURCE)
Expand Down Expand Up @@ -465,7 +465,7 @@ def test_exons_no_filters(
# THEN exon objects should be returned
assert response.status_code == status.HTTP_200_OK
exons = response.json()
assert Exon(**exons[0])
assert ExonBase(**exons[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -488,7 +488,7 @@ def test_exons_by_ensembl_ids(
# THEN exon objects should be returned
assert response.status_code == status.HTTP_200_OK
exons = response.json()
assert Exon(**exons[0])
assert ExonBase(**exons[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -511,7 +511,7 @@ def test_exons_by_ensembl_gene_ids(
# THEN exons objects should be returned
assert response.status_code == status.HTTP_200_OK
exons = response.json()
assert Exon(**exons[0])
assert ExonBase(**exons[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -534,7 +534,7 @@ def test_exons_by_hgnc_ids(
# THEN exon objects should be returned
assert response.status_code == status.HTTP_200_OK
exons = response.json()
assert Exon(**exons[0])
assert ExonBase(**exons[0])


@pytest.mark.parametrize("build", Builds.get_enum_values())
Expand All @@ -557,4 +557,4 @@ def test_exons_by_hgnc_symbols(
# THEN exon objects should be returned
assert response.status_code == status.HTTP_200_OK
exons = response.json()
assert Exon(**exons[0])
assert ExonBase(**exons[0])

0 comments on commit 5262c88

Please sign in to comment.