Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Databases fixtures plugin for py.test.

Project description

pytest-dbfixtures

Latest PyPI version Documentation Status Number of PyPI downloads Wheel Status Egg Status License

Package status

Tests Coverage Status Requirements 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.9.0

  • add ability to set custom location for logs (might be useful for analysing logs from tests)
  • added postgresql 9.4 to supported versions.

0.8.2

  • Use port number in default RabbitMQ node name.

    This allows using just the port=’?’ argument to rabbitmq_proc to run multiple independent RabbitMQ instances for use with xdist to parallelize tests on a single machine.

  • Old versions of Redis notification

    displays a message about old version of redis

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

History Node

1.0.0

History Node

0.17.0

History Node

0.16.0

History Node

0.15.0

History Node

0.14.3

History Node

0.14.2

History Node

0.14.1

History Node

0.14.0

History Node

0.13.1

History Node

0.13.0

History Node

0.12.0

History Node

0.11.0

History Node

0.10.0

This version
History Node

0.9.0

History Node

0.8.2

History Node

0.8.1

History Node

0.8.0

History Node

0.7.0

History Node

0.6.0

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.23

History Node

0.4.22

History Node

0.4.21

History Node

0.4.20

History Node

0.4.19

History Node

0.4.18

History Node

0.4.17

History Node

0.4.16

History Node

0.4.15

History Node

0.4.14

History Node

0.4.13

History Node

0.4.12

History Node

0.4.10

History Node

0.4.8

History Node

0.4.6

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2

History Node

0.4.0

History Node

0.3.8.14

History Node

0.3.8.12

History Node

0.3.8.10

History Node

0.3.8.8

History Node

0.3.8.6

History Node

0.3.8.4

History Node

0.3.8.3

History Node

0.3.8

History Node

0.3.6.12

History Node

0.3.6.10

History Node

0.3.6.8

History Node

0.3.6.5

History Node

0.3.6.4

History Node

0.3.6.3

History Node

0.3.6.2

History Node

0.3.6.1

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3

History Node

0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pytest_dbfixtures-0.9.0-py3-none-any.whl (33.6 kB) Copy SHA256 hash SHA256 Wheel 3.3 Feb 19, 2015
pytest-dbfixtures-0.9.0.tar.gz (17.1 kB) Copy SHA256 hash SHA256 Source None Feb 19, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page