diff options
author | Frederick Muriuki Muriithi | 2022-03-11 11:51:02 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-03-11 11:51:02 +0300 |
commit | 9691e225724e041997c74f8665dcbfa12bb1c579 (patch) | |
tree | 271d99dbf6d72161e343ddf8765f9543fe752e37 /tests/unit | |
parent | a7696cc668e00215e1d5af2425765451811bca9d (diff) | |
download | genenetwork3-9691e225724e041997c74f8665dcbfa12bb1c579.tar.gz |
Fix some linting issues
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test_db_utils.py | 2 | ||||
-rw-r--r-- | tests/unit/test_file_utils.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/test_db_utils.py b/tests/unit/test_db_utils.py index 44d6703..7dc66c0 100644 --- a/tests/unit/test_db_utils.py +++ b/tests/unit/test_db_utils.py @@ -27,6 +27,8 @@ class TestDatabase(TestCase): mock_sql.connect.assert_called_with( "localhost", "guest", "4321", "users") + self.assertIsInstance( + results, SimpleNamespace, "database not created successfully") @pytest.mark.unit_test @mock.patch("gn3.db_utils.SQL_URI", diff --git a/tests/unit/test_file_utils.py b/tests/unit/test_file_utils.py index 7048d43..2c6f0b6 100644 --- a/tests/unit/test_file_utils.py +++ b/tests/unit/test_file_utils.py @@ -66,7 +66,7 @@ non-existent""" "upload-data.tar.gz") mock_tarfile.open.assert_called_once_with("/tmp/abcdef-abcdef/" "upload-data.tar.gz") - mock_tarfile.open.return_value.extractall.assert_called_once_with( + mock_tarfile.open.return_value.__enter__.return_value.extractall.assert_called_once_with( path='/tmp/abcdef-abcdef') mock_file.assert_called_once_with("upload-data.tar.gz") self.assertEqual(result, {"status": 0, "token": "abcdef-abcdef"}) |