pytest-psqlgraph 0.1.1

Last updated:

0 purchases

pytest-psqlgraph 0.1.1 Image
pytest-psqlgraph 0.1.1 Images
Add to Cart

Description:

pytestpsqlgraph 0.1.1

An extension for pytest provide useful tools for testing applications that use psqlgraph

How to Start
Install dependency
pip install pytest-psqlgraph
Define a session scoped psqlgraph_config fixture in conftest.py:
import pytest

@pytest.fixture(scope="session")
def psqlgraph_config() -> Dict[str, DatabaseDriverConfig]:
return {
"pg_driver": DatabaseDriverConfig(
host="localhost",
user="username",
password="pword",
database="db_name",
model=active_model,
dictionary=active_dictionary
)
}
All set to start using the fixture pg_driver or whatever key was defined in the dictionary above
def test_something(pg_driver):
with pg_driver.session_scoped() as s:
s.add(Node(..))

Contributing
Don’t hesitate to create a Github issue for any bugs or suggestions or submit a PR.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.