Skip to main content

A database with a few fantasy books in it for testing query builders, orms, rest frameworks, etc.

Project description

# fantasy-database

> A database with a few fantasy books in it for testing query builders, orms, rest frameworks, etc.


## Django

This test app for Django provides models, migrations, and fixtures that implement the fantasy-database. It's
recommended that app installation be limited to testing only.

Example usage:

In your `settings.py` module:

```python

# Testing
TESTING = len(sys.argv) > 1 and sys.argv[1] in ('test', 'testserver')

if TESTING:
INSTALLED_APPS += (
'django_fantasy',
)

...
```

In a test module:
```python

from django.test import TestCase

class FantasyTests(TestCase):
fixtures = ['fantasy-database.json']
...

```

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

fantasy-database-2.0.3.post2.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

fantasy_database-2.0.3.post2-py2.py3-none-any.whl (14.5 kB view hashes)

Uploaded Python 2 Python 3

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