pytest-couchdbkit
pytest-couchdbkit is a simple pytest extension that manages test databases for your couchdbkit using apps.
In order to use it, you only need to set the ini option couchdbkit_suffix to something fitting your app. Additionally you may use couchdbkit_backend to select the gevent/eventlet backends.
To setup couchapps before running the tests, there is the pytest_couchdbkit_push_app(server, dbname) hook
It can be used to create a pristine database, which is replicated into each test database.
The provided funcarg couchdb will be a freshly flushed database named pytest_ + couchdbkit_suffix,
additionally, after each test item, the database will be dumped to tmpdir.join(couchdb.dump)
which is a simple file having entries in the format:
number(\d+) + "\r\n" + number bytes + "\r\n"
entries are:
the db info
documents
raw attachment data following the document
Attachments are ordered by name, so they can be reassigned to their metadata on loading.
The dump format is meant to be human-readable.
Future
fs fixtures (like couchapp)
code fixtures
dump fixtures
comaring a db to sets of defined fixtures
CHANGELOG
from 0.5 to 0.5.1
fix MANIFEST.in
from 0.4 to 0.5
fix breaking testruns that dont actually use it
add a lot of tests i should have done before 0.4
add support for pytest-xdist, if a slave is detected, push_app wont be called, and dbname gets the gw id appended
from 0.3 to 0.4
add pytest_couchdbkit_push_app hook
from 0.2 to 0.3
switch dump format to chunked encoding
pretty json in dumps
attachments in dumps
utility functions for loading dumps back to a database
from 0.1 to 0.2
use json-lines as extension for the dump
condense json to one line per document for humanly acceptable parsinig
fail if no couchdbkit_prefix is set
0.1
initial stuff
Metadata
Release files for pytest-couchdbkit 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest-couchdbkit-0.5.1.tar.gz | 4.8 kB | Without provenance | Details for pytest-couchdbkit-0.5.1.tar.gz |
Release files / pytest-couchdbkit-0.5.1.tar.gz
| Download URL | pytest-couchdbkit-0.5.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d87a52ec347f4f18b5fcceb5d046f8dc92a37be19268ee17ece30ab8934902a
|
|
BLAKE2b-256 checksum How to use checksums |
a1b70e7b02a3afbd330800a6861b3fbff38d6d3a08bfef69e1a2520cbc4fdf7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pytest-couchdbkit 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.