aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBonfaceKilz2021-05-19 22:12:45 +0300
committerBonfaceKilz2021-05-20 23:25:59 +0300
commit08e82448462babd1e5bad88e419326039abdf43d (patch)
tree5a9f91d2898411f272fdbdff4abc1d4cced67759 /tests
parentc9f6c7b3c3541c1b60781c78aa3e21a02604bfa0 (diff)
downloadgenenetwork3-08e82448462babd1e5bad88e419326039abdf43d.tar.gz
db: phenotypes: Update failing tests
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/db/test_phenotypes.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/unit/db/test_phenotypes.py b/tests/unit/db/test_phenotypes.py
index 8b810fe..6b394d7 100644
--- a/tests/unit/db/test_phenotypes.py
+++ b/tests/unit/db/test_phenotypes.py
@@ -3,19 +3,20 @@ from unittest import TestCase
from unittest import mock
from gn3.db.phenotypes import Phenotype
-from gn3.db.phenotypes import update_phenotype
+from gn3.db.phenotypes import update
class TestPhenotypes(TestCase):
"""Test cases for fetching chromosomes"""
def test_update_phenotype_with_no_data(self):
- """
- Test that a phenotype is updated correctly if an empty Phenotype dataclass
+ """Test that a phenotype is updated correctly if an empty Phenotype dataclass
is provided
+
"""
db_mock = mock.MagicMock()
- self.assertEqual(update_phenotype(
- db_mock, data=Phenotype(), where=Phenotype()), None)
+ self.assertEqual(update(
+ conn=db_mock, table="Phenotype",
+ data=Phenotype(), where=Phenotype()), None)
def test_update_phenotype_with_data(self):
"""
@@ -25,8 +26,9 @@ class TestPhenotypes(TestCase):
db_mock = mock.MagicMock()
with db_mock.cursor() as cursor:
type(cursor).rowcount = 1
- self.assertEqual(update_phenotype(
- db_mock, data=Phenotype(
+ self.assertEqual(update(
+ conn=db_mock, table="Phenotype",
+ data=Phenotype(
pre_pub_description="Test Pre Pub",
submitter="Rob",
post_pub_description="Test Post Pub"),