This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This is a utility collection for packaging Django App. The following features are available.

  1. Unittest utility for running with
  2. Unittest utility for dynamically adding models only used in the test
  3. Automatically create user within syncdb command

How to install

Use pip comand or easy_install:

pip install django-packageutils

Directory tree assumed

    +- RELEASE-VERSION          # used for git versioning
    +- packagename              # your package
        +-            # or whatever
        +- tests
            +-   # or whatever
            +- testapp          # App only required in tests of this package
    +- test                     # django project for testing
        +-          # for running test with

Unittest utility for running with

Write your in your package directory as:

import os
from packageutils.test import get_package_runner
from packageutils.test import run_tests

def runtests(verbosity=1, interactive=True):
    package_dir = os.path.dirname(__file__)
    test_runner = get_package_runner(package_dir, verbosity, interactive)
    run_tests(test_runner, ['some_application_name'])

if __name__ == '__main__':

Add test suite to your as:

    # ... some configures
    install_requires = [
        'distribute',           # recommended
        'setuptools-git',       # recommended
        'django-packageutils',  # required
        # and some other requires
    test_suite = 'tests.runtests.runtests',
    test_require = [

Then execute the following command:

python test

Unittest utility for dynamically adding models only used in the test

With Django default TestCase, you cannot add required models within test. Sometime you need extra models for testing your django package then you can use AppTestCase as:

from packageutils.testcase import AppTestCase
from testapp.models import Article

class TestAppTestCase(AppTestCase):
    # Apps only required in this test
    installed_apps = [
    # Middlewares only required in this test
    middleware_classes = [

    def test_creation(self):
        article = Article.objects.create(title='foo')
        assert Article.objects.filter(title='foo').exists()

Automatically create user within syncdb command

Add packageutils.syncdb.autouser in INSTALLED_APPS then admin user is created automatically within syncdb command (password will be set as ‘admin’)

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_packageutils-0.1.0-py2.7.egg (60.1 kB) Copy SHA256 Checksum SHA256 2.7 Egg Feb 2, 2012
django-packageutils-0.1.0.tar.gz (22.7 kB) Copy SHA256 Checksum SHA256 Source Feb 2, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting