Databases fixtures plugin for py.test.
Project description
pytest-dbfixtures
Package status
Overview
py.test clean fixtures for: postgresql, mysql, redis, mongo, elasticsearch and rabbitmq.
Starts specific database deamon and cleanup all data produced during tests.
Install
$ pip install --upgrade pytest-dbfixtures
How to use
Please see documentation
CHANGES
0.8.1
Feature: random ports selection Adds a possibility of passing ‘?’ in port= argument of process fixtures.
Removes ‘port’ from db fixtures
Fixes postgres missing host - previously using config.postgresql.unixsocketdir
0.7.0
redisdb fixture allows to specify client connection class
redisdb fixture uses now StrictRedis by default (backward incompatible)
0.6.0
replaced MySQLdb with it’s fork mysqlclient - compatibility with python3
renamed mysqldb fixture to mysql to keep it consistent with other client fixtures.
replaced pika with python 3 compatible rabbitpy
removed deprecated mysqldb_session/mysql_session
bugfix of rabbitmq fixture: cast rabbitmq queues and exchanges to str due to pamq having problems
internal changes: removed GentleKillingExecutor as mirakuru already implements same functionality
0.5.2
syntax fixes for python 3
moved postgresql starting code into it’s own executor
xdist distributed hosts testing bugfix (but xdist parallelization on one host won’t work)
0.5.1
make rabbitmq logs persistent
0.5.0
update mirakuru to min 0.2
os.killpg to terminate process
add tests coverage on coveralls
0.4.22
remove creating old RABBITMQ env variables
0.4.21
remove elasticsearch home folder at process teardown
set elasticsearch index.store.type to memory by default
localized elasticsearch instance by default
replaced summon_process with mirakuru
0.4.20
RabbitMQ process fixture is session scoped
rabbitmq fixture factory accepts custom teardown
0.4.19
StopRunningExecutor to simply return if process had been already killed.
0.4.18
MongoDB fixtures can be now initialized by factories
0.4.17
Bugfix: params in redis fixture
0.4.16
Add params to mysql fixture
0.4.15
Client fixtures now check if process (process fixture) is running before every test and starts process if it was terminated after previous test.
0.4.14
Bugfix: Now we don’t overwrite postgresql config in postgres_proc
0.4.13
Bugfix of rabbitmq_proc fixture - now it works with scope=function
0.4.12
Overrides SimpleExecutor’s behavior with a try of more gentle terminating subprocess before killing it.
Deprecate scope for mysqldb fixture and change it to function by default.
RabbitMQ factories support (multiple rabbit fixtures).
0.4.10
Postgresql multiple versions proper support
Default timeouts and waits for process executors
0.4.8
introduced Elasticsearch fixture
0.4.6
mysql fixture now uses factories
0.4.4
postgresql fixtures and fixture factories
small code quality improvements
pylama code check
0.4.3
splits rabbitmq fixture into process/client fixtures
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 Distributions
File details
Details for the file pytest-dbfixtures-0.8.1.tar.gz
.
File metadata
- Download URL: pytest-dbfixtures-0.8.1.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea0035b9f7c735cdc6b8fd8c2461e5d091de8bb4dff25847359e6bf51b2e24bc |
|
MD5 | a79261ab29b9ef0a7c2c3fbe2422a5c6 |
|
BLAKE2b-256 | 5e19aa56b7dec57a9f6403e2a218e926694d855402c9d06b820875502b440e86 |
File details
Details for the file pytest_dbfixtures-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: pytest_dbfixtures-0.8.1-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8d07bf094a4f04d483177c125d6960554e791145dce64c9d7600e5f3440e84f |
|
MD5 | 3d937782619341a135b006fc1bbcf21e |
|
BLAKE2b-256 | f81a51b54c63d2537c053e4e89d66a0cd27dd62ff843893bec7b1a5d421b7550 |
File details
Details for the file pytest_dbfixtures-0.8.1-py2-none-any.whl
.
File metadata
- Download URL: pytest_dbfixtures-0.8.1-py2-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80b287f622983a061c1613927a5150464d7c2849e075be888e1db689e7f2007d |
|
MD5 | 56f222620d9eb8572dfffed7c0bfbdb5 |
|
BLAKE2b-256 | 8e7e6232e8e703b2bc07687b66d97c1ff61a7cb0300bf16ff8e5b2dfa6170272 |