diff options
author | BonfaceKilz | 2020-07-27 15:06:02 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-07-27 15:06:02 +0300 |
commit | 957e05d33eb423df99181a99e7c25891810a21f7 (patch) | |
tree | 6243910abed44b4f370ef74e5d35826f6e2f4859 | |
parent | 5cad720187b3c53b6d64c64d45be4bc020eed52d (diff) | |
download | genenetwork2-957e05d33eb423df99181a99e7c25891810a21f7.tar.gz |
Check that Redis is called correctly
* wqflask/tests/base/test_data_set.py: assert that `set` and `get` are called
correctly
-rw-r--r-- | wqflask/tests/base/test_data_set.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wqflask/tests/base/test_data_set.py b/wqflask/tests/base/test_data_set.py index 835d786a..3ac1b6d6 100644 --- a/wqflask/tests/base/test_data_set.py +++ b/wqflask/tests/base/test_data_set.py @@ -42,6 +42,7 @@ class TestDataSetTypes(unittest.TestCase): """ self.assertEqual(DatasetType(redis_mock) ("All Phenotypes"), "Publish") + redis_mock.get.assert_called_once_with("dataset_structure") @mock.patch('base.data_set.requests.get') def test_data_set_type_with_empty_redis(self, request_mock): @@ -57,3 +58,6 @@ class TestDataSetTypes(unittest.TestCase): self.assertEqual(data_set("BXDGeno"), "Geno") self.assertEqual(data_set("BXDPublish"), "Publish") self.assertEqual(data_set("HLC_0311"), "ProbeSet") + redis_mock.set.assert_called_once_with( + "dataset_structure", + '{"BXDGeno": "Geno", "BXDPublish": "Publish", "HLCPublish": "Publish", "HLC_0311": "ProbeSet", "HC_M2_0606_P": "ProbeSet"}') |