Skip to main content

Utilities for integration tests against Synapse.

Project description

Build Status Coverage Status

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:

  1. Rename .env.template to .env and set the variables in the file.
  2. Run make test or tox

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

synapse_test_helper-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

synapse_test_helper-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

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

Hashes for synapse_test_helper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae534825d4d04bb96dc869b584b5239f2233f4e617f40bb77e2ff858820c566e
MD5 694106a1813d3ede4951ef43a977b0b5
BLAKE2b-256 2c5679ba860819d730877fde94958e67a9cd7858d8c7931e1d4970875cff5ad9

See more details on using hashes here.

File details

Details for the file synapse_test_helper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for synapse_test_helper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aee8e65c26fd8f7efec27422e7d32b976d9f08422c5d51b74c81fdeb99d68d1f
MD5 601e7e6a6f4c3dfa7d52f0689d160d31
BLAKE2b-256 5ce1a72fb3fa50ae13e3cfab8fc8c413dc08031c828f2062de6cba625ca7368f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page