diff options
author | BonfaceKilz | 2021-03-10 12:51:53 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-03-10 12:53:12 +0300 |
commit | c1280700137390e98017f251ed26a0a656fa49d9 (patch) | |
tree | ab7b29aa240b212f547303e78c801599d28e1f62 /tests | |
parent | e6c8d3f3a43621ccc34f77b50e220eb684617146 (diff) | |
download | genenetwork3-c1280700137390e98017f251ed26a0a656fa49d9.tar.gz |
Update test to ensure redis.hset is called correctly
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_commands.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/unit/test_commands.py b/tests/unit/test_commands.py index c51118d..aafb3a2 100644 --- a/tests/unit/test_commands.py +++ b/tests/unit/test_commands.py @@ -81,9 +81,9 @@ class TestCommands(unittest.TestCase): job_queue="GN2::job-queue"), actual_unique_id) mock_redis_conn.hset.assert_has_calls( - [mock.call("cmd", "ls", actual_unique_id), - mock.call("result", "", actual_unique_id), - mock.call("status", "queued", actual_unique_id)]) + [mock.call(name=actual_unique_id, key="cmd", value="ls"), + mock.call(name=actual_unique_id, key="result", value=""), + mock.call(name=actual_unique_id, key="status", value="queued")]) mock_redis_conn.rpush.assert_has_calls( [mock.call("GN2::job-queue", actual_unique_id)]) @@ -107,10 +107,11 @@ class TestCommands(unittest.TestCase): email="me@me.com"), actual_unique_id) mock_redis_conn.hset.assert_has_calls( - [mock.call("cmd", "ls", actual_unique_id), - mock.call("result", "", actual_unique_id), - mock.call("status", "queued", actual_unique_id), - mock.call("email", "me@me.com", actual_unique_id)]) + [mock.call(name=actual_unique_id, key="cmd", value="ls"), + mock.call(name=actual_unique_id, key="result", value=""), + mock.call(name=actual_unique_id, key="status", value="queued"), + mock.call(name=actual_unique_id, key="email", value="me@me.com") + ]) mock_redis_conn.rpush.assert_has_calls( [mock.call("GN2::job-queue", actual_unique_id)]) |