aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-04-06 12:43:56 +0300
committerFrederick Muriuki Muriithi2023-04-06 12:43:56 +0300
commitdb6457bfbcccce35162d9d2ece988c7c8c8f9308 (patch)
tree47e4e5f8023fe41ef9e37a88138bc1c1a359eda5 /tests/unit
parent17abad9300e4a96a14f94da486ef8307f7d27e06 (diff)
downloadgenenetwork3-db6457bfbcccce35162d9d2ece988c7c8c8f9308.tar.gz
Fix linting issues
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_db_utils.py5
1 files changed, 1 insertions, 4 deletions
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)