diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..9d5d250d095009403f66851f48866f5cfe39703b --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include LICENSE +include README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..53eb488c06768391750bc5d1b1dcf23f71410f1e --- /dev/null +++ b/README.rst @@ -0,0 +1,31 @@ +Temporary PostgreSQL databases for Django and pytest +==================================================== + +Use case +-------- + +This pytest plugin can be used to test a Django application that uses +PostgreSQL. It leverages the `testing.postgresql`_ module to setup a +temporary PostgreSQL database server and injects the configuration for it +into Django's settings. It is intended to be used together with +`pytest-django`_. + +Requirements +------------ + +`testing.postgresql`_ needs the postgresql server binary available. + +How to use +---------- + +To use, simply install the package in your testing environment and laod +the `django-testing-psotgresql` plugin when running pytest (pytest normally +auto-discovers it). + +The plugin re-uses the configuration used by `pytest-django`_. + +Limitations +----------- + +.. _testing.postgresql: https://pypi.org/project/testing.postgresql/ +.. _pytest-django: https://pypi.org/project/pytest-django/ diff --git a/setup.py b/setup.py index 64e72e8affb3b09c9ccedac4c5f6a61e136141f8..4b4fedb59d4581f9730e6fcb4d33acd6414dc186 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,32 @@ +from os import path + from setuptools import setup +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + setup( name="pytest-django-testing-postgresql", version='0.1', description='Use a temporary PostgreSQL database with pytest-django', + long_description=long_description, author='Dominik George', author_email='nik@naturalnet.de', url='https://edugit.org/nik/pytest-django-testing-postgresql', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Framework :: Django', + 'Framework :: Pytest', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3' + ], + py_modules=['pytest_django_testing_postgresql'], install_requires=['dj-database-url', 'testing.postgresql'], + zip_safe=False, entry_points = { 'pytest11': [