No project description provided
Project description
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": {
"host": "localhost",
"user": "username",
"password": "pword",
"database": "db_name"
}
}
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest-psqlgraph-0.1.0.tar.gz
(22.8 kB
view hashes)
Built Distribution
Close
Hashes for pytest_psqlgraph-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58682d297be9a58851bc25855e4dc2ef9815d7bfc1357268aad459a8ac518cd0 |
|
MD5 | ad49a57b615fcb2c924392c78583866b |
|
BLAKE2b-256 | 93f2752c2b42c04286d2102026773d9c14b069524066becaf6e229cba59bd214 |