diff options
author | Frederick Muriuki Muriithi | 2023-04-06 12:43:56 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-04-06 12:43:56 +0300 |
commit | db6457bfbcccce35162d9d2ece988c7c8c8f9308 (patch) | |
tree | 47e4e5f8023fe41ef9e37a88138bc1c1a359eda5 | |
parent | 17abad9300e4a96a14f94da486ef8307f7d27e06 (diff) | |
download | genenetwork3-db6457bfbcccce35162d9d2ece988c7c8c8f9308.tar.gz |
Fix linting issues
-rw-r--r-- | tests/integration/conftest.py | 2 | ||||
-rw-r--r-- | tests/unit/test_db_utils.py | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 795c42d..8e39726 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -18,7 +18,7 @@ def client(): @pytest.fixture(scope="session") -def db_conn(client): +def db_conn(client): # pylint: disable=[redefined-outer-name] """Create a db connection fixture for tests""" # 01) Generate random string to append to all test db artifacts for the session live_db_uri = client.application.config["SQL_URI"] diff --git a/tests/unit/test_db_utils.py b/tests/unit/test_db_utils.py index 0211107..beb7169 100644 --- a/tests/unit/test_db_utils.py +++ b/tests/unit/test_db_utils.py @@ -3,7 +3,6 @@ from unittest import mock import pytest -import gn3 from gn3.db_utils import parse_db_url, database_connection @pytest.mark.unit_test @@ -11,11 +10,9 @@ from gn3.db_utils import parse_db_url, database_connection @mock.patch("gn3.db_utils.parse_db_url") def test_database_connection(mock_db_parser, mock_sql): """test for creating database connection""" - print(f"MOCK SQL: {mock_sql}") - print(f"MOCK DB PARSER: {mock_db_parser}") mock_db_parser.return_value = ("localhost", "guest", "4321", "users", None) - with database_connection("mysql://guest:4321@localhost/users") as conn: + with database_connection("mysql://guest:4321@localhost/users") as _conn: mock_sql.connect.assert_called_with( db="users", user="guest", passwd="4321", host="localhost", port=3306) |