Skip to main content

Databases fixtures plugin for py.test.

Project description

pytest-dbfixtures

Tests for pytest-dbfixtures Latest PyPI version Number of PyPI downloads

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.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-dbfixtures-0.6.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distributions

pytest_dbfixtures-0.6.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

pytest_dbfixtures-0.6.0-py2-none-any.whl (29.4 kB view details)

Uploaded Python 2

File details

Details for the file pytest-dbfixtures-0.6.0.tar.gz.

File metadata

File hashes

Hashes for pytest-dbfixtures-0.6.0.tar.gz
Algorithm Hash digest
SHA256 fef94def38f91605ec8a07f8dbeae9c7592574621373bf4c4af66d65afea253e
MD5 cc8158a2140b8891f4ce1f379cf8c113
BLAKE2b-256 a8a2a2d8323b691f5570e5f79fc93a65c32ec6ecb4102d8a98569cccf816af2d

See more details on using hashes here.

File details

Details for the file pytest_dbfixtures-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_dbfixtures-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 489939d4cb445a9165eb6ede518237e5153d487964526255674e59fa8215a272
MD5 50035ee42ebb2cb2cfe84945fbb0b2c7
BLAKE2b-256 3cbd1dd764b432dd853b597ac5fc28f9fa0d568f1f47dbe944feb5898f1eee3f

See more details on using hashes here.

File details

Details for the file pytest_dbfixtures-0.6.0-py2-none-any.whl.

File metadata

File hashes

Hashes for pytest_dbfixtures-0.6.0-py2-none-any.whl
Algorithm Hash digest
SHA256 ee2723ec82893d2bcd9fe8f4656f2d20c78bd768107235b8fbd5f64e3844cb07
MD5 3fecb0abc4d36c88443a4136698a7418
BLAKE2b-256 f09a444fcffc95f60465eb7e4dfaf378a29bf86ec085ea16c566a1f9bf11192e

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