pytest plugin for testing applications that use psqlgraph
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": 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.
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
Built Distribution
Close
Hashes for pytest-psqlgraph-0.2.0rc2.dev4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c10b51617e0c12226c8e212d2f29b3742270fefcd827f8548910bfbfa6ead251 |
|
MD5 | e29b160ffd75df0a316018d33612df83 |
|
BLAKE2b-256 | ca7738c7fdeaf08c53032c770ed68fe39da723f43687623ec1f39be55c7bb763 |
Close
Hashes for pytest_psqlgraph-0.2.0rc2.dev4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190be6ce0ca07de23c25b448479aa2f40781d09fdfb4bd314167cdb14da6cd8e |
|
MD5 | 844f31b1317a6e349611a736afdbefcf |
|
BLAKE2b-256 | dcc7f5adfee83e1cb3dc4203514d689f130668976227d6f95ec7f9c4cd580f2f |