diff options
author | BonfaceKilz | 2021-06-02 08:22:11 +0300 |
---|---|---|
committer | zsloan | 2021-06-18 22:08:04 +0000 |
commit | a2ef9618dbba2d3f0416cbe8a527ed12070aa67e (patch) | |
tree | 6edc255bc534610870f9bf06aa85c177cb4dc6f4 /tests/unit/db | |
parent | ece41f5f971595c5d005c4beaa984c45471a6647 (diff) | |
download | genenetwork3-a2ef9618dbba2d3f0416cbe8a527ed12070aa67e.tar.gz |
unit: test_phenotypes: Test for multiple "WHERE" clauses
Diffstat (limited to 'tests/unit/db')
-rw-r--r-- | tests/unit/db/test_phenotypes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/db/test_phenotypes.py b/tests/unit/db/test_phenotypes.py index b53db23..fdeca5e 100644 --- a/tests/unit/db/test_phenotypes.py +++ b/tests/unit/db/test_phenotypes.py @@ -34,14 +34,14 @@ class TestPhenotypes(TestCase): pre_pub_description="Test Pre Pub", submitter="Rob", post_pub_description="Test Post Pub"), - where=Phenotype(id_=1)), 1) + where=Phenotype(id_=1, owner="Rob")), 1) cursor.execute.assert_called_once_with( "UPDATE Phenotype SET " "Pre_publication_description = " "'Test Pre Pub', " "Post_publication_description = " "'Test Post Pub', Submitter = 'Rob' " - "WHERE id = '1'" + "WHERE id = '1' AND Owner = 'Rob'" ) def test_fetch_phenotype(self): @@ -58,12 +58,12 @@ class TestPhenotypes(TestCase): cursor.fetchone.return_value = test_data phenotype = fetchone(db_mock, "Phenotype", - where=Phenotype(id_=35)) + where=Phenotype(id_=35, owner="Rob")) self.assertEqual(phenotype.id_, 35) self.assertEqual(phenotype.pre_pub_description, "Test pre-publication") cursor.execute.assert_called_once_with( - "SELECT * FROM Phenotype WHERE id = '35'") + "SELECT * FROM Phenotype WHERE id = '35' AND Owner = 'Rob'") def test_diff_from_dict(self): """Test that a correct diff is generated""" |