Utilities for integration tests against Synapse.
Project description
synapse-test-helper
Utilities for integration testing against Synapse.
Installation
pip install synapse-test-helper
Usage
Create a fixture that yields a configured instance of SynapseTestHelper using the context manager.
Example:
conftest.py:
from synapse_test_helper import SynapseTestHelper
@pytest.fixture
def synapse_test_helper():
synapse_client = synapseclient.Synapse()
synapse_client.login() # Set to use your preferred login method for Synapse.
with SynapseTestHelper(synapse_client) as sth:
yield sth
test_my_stuff.py:
def test_my_fuction(synapse_test_helper):
project = synapse_test_helper.create_project()
# other test code...
# when this method ends the project will be deleted on Synapse.
Development Setup
git clone https://github.com/ki-tools/synapse-test-helper-py.git
cd synapse-test-helper-py
pipenv --three
pipenv shell
make pip_install
Run tests:
- Rename
.env.templateto.envand set the variables in the file. - Run
make testortox
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapse_test_helper-0.1.0.tar.gz.
File metadata
- Download URL: synapse_test_helper-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae534825d4d04bb96dc869b584b5239f2233f4e617f40bb77e2ff858820c566e
|
|
| MD5 |
694106a1813d3ede4951ef43a977b0b5
|
|
| BLAKE2b-256 |
2c5679ba860819d730877fde94958e67a9cd7858d8c7931e1d4970875cff5ad9
|
File details
Details for the file synapse_test_helper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: synapse_test_helper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee8e65c26fd8f7efec27422e7d32b976d9f08422c5d51b74c81fdeb99d68d1f
|
|
| MD5 |
601e7e6a6f4c3dfa7d52f0689d160d31
|
|
| BLAKE2b-256 |
5ce1a72fb3fa50ae13e3cfab8fc8c413dc08031c828f2062de6cba625ca7368f
|