From 3f0d45848280b77a35a569682e93291204769cc8 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 4 May 2021 23:56:32 +0300 Subject: tests: test_species: Update failing tests --- wqflask/tests/unit/base/test_species.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wqflask/tests/unit/base/test_species.py b/wqflask/tests/unit/base/test_species.py index 487bbd7f..9b5c023c 100644 --- a/wqflask/tests/unit/base/test_species.py +++ b/wqflask/tests/unit/base/test_species.py @@ -81,17 +81,17 @@ class TestChromosomes(unittest.TestCase): ] mock_dataset = MockDataset(MockGroup("Random")) test_chromosomes = Chromosomes(dataset=mock_dataset) + self.assertEqual( + list(test_chromosomes.chromosomes.keys()), + [1, 2, 3] + ) + self.assertEqual(test_chromosomes.dataset, mock_dataset) mock_db.db.execute.assert_called_with( "SELECT Chr_Length.Name, Chr_Length.OrderId, Length " "FROM Chr_Length, InbredSet WHERE " "Chr_Length.SpeciesId = InbredSet.SpeciesId AND " "InbredSet.Name = 'Random' ORDER BY OrderId" ) - self.assertEqual( - list(test_chromosomes.chromosomes.keys()), - [1, 2, 3] - ) - self.assertEqual(test_chromosomes.dataset, mock_dataset) @mock.patch("base.species.g") def test_create_chromosomes_with_species(self, mock_db): @@ -104,13 +104,13 @@ class TestChromosomes(unittest.TestCase): mock_dataset = MockDataset(MockGroup("Random")) test_chromosomes = Chromosomes(dataset=mock_dataset, species="testSpecies") + self.assertEqual( + list(test_chromosomes.chromosomes.keys()), + [1, 2, 3] + ) mock_db.db.execute.assert_called_with( "SELECT Chr_Length.Name, Chr_Length.OrderId, Length " "FROM Chr_Length, Species WHERE " "Chr_Length.SpeciesId = Species.SpeciesId AND " "Species.Name = 'Testspecies' ORDER BY OrderId" ) - self.assertEqual( - list(test_chromosomes.chromosomes.keys()), - [1, 2, 3] - ) -- cgit v1.2.3