From 8822a5ce161461a4d15326af4ef90bc574b72048 Mon Sep 17 00:00:00 2001 From: John Nduli Date: Wed, 6 Nov 2024 17:01:28 +0300 Subject: fix: failing tests due to changes in geno_db_exists --- gn2/tests/unit/wqflask/marker_regression/test_run_mapping.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gn2/tests/unit/wqflask/marker_regression') diff --git a/gn2/tests/unit/wqflask/marker_regression/test_run_mapping.py b/gn2/tests/unit/wqflask/marker_regression/test_run_mapping.py index 817bf2b9..569756c3 100644 --- a/gn2/tests/unit/wqflask/marker_regression/test_run_mapping.py +++ b/gn2/tests/unit/wqflask/marker_regression/test_run_mapping.py @@ -2,6 +2,7 @@ import unittest import datetime from unittest import mock +import gn2.wqflask.marker_regression.run_mapping as run_mapping from gn2.wqflask.marker_regression.run_mapping import get_genofile_samplelist from gn2.wqflask.marker_regression.run_mapping import geno_db_exists from gn2.wqflask.marker_regression.run_mapping import write_input_for_browser @@ -65,8 +66,9 @@ class TestRunMapping(unittest.TestCase): def test_if_geno_db_exists(self, mock_data_set): mock_data_set.create_dataset.side_effect = [ AttributeSetter({}), Exception()] - results_no_error = geno_db_exists(self.dataset) - results_with_error = geno_db_exists(self.dataset) + run_mapping.create_trait = mock.Mock() + results_no_error = geno_db_exists(self.dataset, "dataset_1") + results_with_error = geno_db_exists(self.dataset, "dataset_1") self.assertEqual(mock_data_set.create_dataset.call_count, 2) self.assertEqual(results_with_error, "False") -- cgit v1.2.3