Skip to content

Commit 5809ba4

Browse files
committed
Target Gene Test Updates
1 parent a284673 commit 5809ba4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/view_models/test_target_gene.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def test_create_target_gene_with_sequence():
77
name = "UBE2I"
8-
category = "Regulatory"
8+
category = "regulatory"
99
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 1}]
1010
target_sequence = {
1111
"sequenceType": "dna",
@@ -37,12 +37,12 @@ def test_create_target_gene_with_sequence():
3737
target_sequence=target_sequence,
3838
)
3939
assert externalIdentifier.name == "UBE2I"
40-
assert externalIdentifier.category == "Regulatory"
40+
assert externalIdentifier.category == "regulatory"
4141

4242

4343
def test_create_target_gene_with_accession():
4444
name = "BRCA1"
45-
category = "Regulatory"
45+
category = "regulatory"
4646
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 1}]
4747
target_accession = {"accession": "NM_001637.3", "assembly": "GRCh37", "gene": "BRCA1"}
4848
externalIdentifier = TargetGeneCreate(
@@ -52,7 +52,7 @@ def test_create_target_gene_with_accession():
5252
target_accession=target_accession,
5353
)
5454
assert externalIdentifier.name == "BRCA1"
55-
assert externalIdentifier.category == "Regulatory"
55+
assert externalIdentifier.category == "regulatory"
5656

5757

5858
def test_create_invalid_category():
@@ -91,14 +91,14 @@ def test_create_invalid_category():
9191
target_sequence=target_sequence,
9292
)
9393
assert (
94-
"invalid name is not a valid target category. Valid categories are Protein coding, Regulatory, and Other"
95-
" noncoding" in str(exc_info.value)
94+
"value is not a valid enumeration member; permitted: 'protein_coding', 'regulatory', 'other_noncoding'"
95+
in str(exc_info.value)
9696
)
9797

9898

9999
def test_create_invalid_sequence_type():
100100
name = "UBE2I"
101-
category = "Regulatory"
101+
category = "regulatory"
102102
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 0}]
103103
taxonomy = {
104104
"taxId": 9606,
@@ -136,7 +136,7 @@ def test_create_invalid_sequence_type():
136136

137137
def test_create_not_match_sequence_and_type():
138138
name = "UBE2I"
139-
category = "Regulatory"
139+
category = "regulatory"
140140
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 0}]
141141
target_sequence = {"sequenceType": "dna", "sequence": "ARCG"}
142142
taxonomy = {
@@ -163,7 +163,7 @@ def test_create_not_match_sequence_and_type():
163163

164164
def test_create_invalid_sequence():
165165
name = "UBE2I"
166-
category = "Regulatory"
166+
category = "regulatory"
167167
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 0}]
168168
target_sequence = {"sequenceType": "dna", "sequence": "AOCG%"}
169169
taxonomy = {
@@ -190,7 +190,7 @@ def test_create_invalid_sequence():
190190

191191
def test_cant_create_target_gene_without_sequence_or_accession():
192192
name = "UBE2I"
193-
category = "Regulatory"
193+
category = "regulatory"
194194
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 1}]
195195
with pytest.raises(ValueError) as exc_info:
196196
TargetGeneCreate(
@@ -204,7 +204,7 @@ def test_cant_create_target_gene_without_sequence_or_accession():
204204

205205
def test_cant_create_target_gene_with_both_sequence_and_accession():
206206
name = "UBE2I"
207-
category = "Regulatory"
207+
category = "regulatory"
208208
external_identifiers = [{"identifier": {"dbName": "Ensembl", "identifier": "ENSG00000103275"}, "offset": 1}]
209209
target_accession = {"accession": "NM_001637.3", "assembly": "GRCh37", "gene": "BRCA1"}
210210
target_sequence = {

0 commit comments

Comments
 (0)