django-test-helpers-0.1.0
توضیحات
UNKNOWN
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-test-helpers-0.1.0 |
| نام | django-test-helpers |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | DISQUS |
| ایمیل نویسنده | opensource@disqus.com |
| آدرس صفحه اصلی | http://github.com/disqus/django-test-helpers |
| آدرس اینترنتی | https://pypi.org/project/django-test-helpers/ |
| مجوز | Apache License 2.0 |
django-test-helpers
===================
Test helpers, mostly geared around the database. Tested on Django 1.2.
Install
-------
::
pip install django-test-helpers
Usage
-----
Create a temporary database:
::
from testhelpers.dbmanager import TemporaryDatabase
with TemporaryDatabase(fixtures=['myfixture.json'], db_prefix='test'):
# do some stuff
pass
.. note:: If you're using Nashvegas, the TemporaryDatabase will attempt to automatically migrate your database
and preserve executed migrations.
Run some commands in transactional isolation:
::
from testhelpers.dbmanager import Transactionless
with Transactionless(fixtures=['myfixture.json']):
# do some stuff
pass
نحوه نصب
نصب پکیج whl django-test-helpers-0.1.0:
pip install django-test-helpers-0.1.0.whl
نصب پکیج tar.gz django-test-helpers-0.1.0:
pip install django-test-helpers-0.1.0.tar.gz