Skip to main content

Slightly modified test utils from django-cms as a own module

Project description

Utils for test setup based on test utils from django-cms

Installation

For the current stable version:

pip install django-easytests

For the development version:

pip install -e git+git://github.com/fivethreeo/django-easytests.git#egg=django-easytests

Example usage in runtests.py:

#!/usr/bin/env python
from djeasytests.testsetup import TestSetup, default_settings

default_settings.update(dict(
    ROOT_URLCONF='shop_categories.test_utils.project.urls',
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': 'shopexampledb.sqlite',
        }
    },
    INSTALLED_APPS = [
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.admin',
        'django.contrib.sites',
        'django.contrib.staticfiles',
        'treeadmin',
        'shop_categories',
        'shop_categories.test_utils.project'
    ],
    SHOP_PRODUCT_MODEL = 'shop_categories.test_utils.project.models.product.Product',
    SHOP_CATEGORIES_CATEGORY_MODEL = 'shop_categories.test_utils.project.models.category.Category'
))

testsetup = TestSetup(appname='shop_categories', default_settings=default_settings)

if __name__ == '__main__':
    testsetup.run('tests') # Can be 'tests', 'shell' or 'testserver'

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

django-easytests-0.8.beta.7.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file django-easytests-0.8.beta.7.tar.gz.

File metadata

File hashes

Hashes for django-easytests-0.8.beta.7.tar.gz
Algorithm Hash digest
SHA256 7c7e1fb804a4c4eb7bb6d3395db1fe88ef81de41e348e685a5affe337112a6a1
MD5 2fd1b77b37bbd8b808db27333f9b82ca
BLAKE2b-256 ab3da15e57cb06c2c6fe16cbebba6b4822686dc4421a30d8b33cedd52515a10b

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