mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 21:23:55 +02:00
test: Add missing unit tests
This commit is contained in:
1
tests/utils/postgres/__init__.py
Normal file
1
tests/utils/postgres/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
"""Tests for utils.postgres module."""
|
14
tests/utils/postgres/connector_test.py
Normal file
14
tests/utils/postgres/connector_test.py
Normal file
@ -0,0 +1,14 @@
|
||||
from unittest.mock import patch
|
||||
|
||||
from aki_prj23_transparenzregister.config.config_template import PostgreConnectionString
|
||||
from aki_prj23_transparenzregister.utils.postgres.connector import get_engine
|
||||
|
||||
|
||||
def test_get_engine():
|
||||
conn_args = PostgreConnectionString("", "", "", "", 42)
|
||||
with patch(
|
||||
"aki_prj23_transparenzregister.utils.postgres.connector.create_engine"
|
||||
) as mock_create_engine:
|
||||
result = "someThing"
|
||||
mock_create_engine.return_value = result
|
||||
assert get_engine(conn_args) == result
|
0
tests/utils/postgres/entities_test.py
Normal file
0
tests/utils/postgres/entities_test.py
Normal file
Reference in New Issue
Block a user