~ubuntu-branches/ubuntu/jaunty/python-django/jaunty-updates

« back to all changes in this revision

Viewing changes to django/contrib/gis/tests/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081115191533-xbt1ut2xf4fvwtvc
Tags: 1.0.1-0ubuntu1
* New upstream release:
  - Bug fixes.

* The tests/ sub-directory appaers to have been dropped upstream, so pull
  our patch to workaround the tests and modify the rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import sys, unittest
2
2
 
3
 
from django.conf import settings
4
 
from django.db import connection
5
 
from django.db.models import get_app, get_apps, loading
6
 
from django.test.simple import build_suite, build_test
7
 
from django.test.utils import setup_test_environment, teardown_test_environment
8
 
 
9
3
def geo_suite():
10
4
    """
11
5
    Builds a test suite for the GIS package.  This is not named
13
7
    spatial database tables are required to execute these tests on
14
8
    some backends).
15
9
    """
 
10
    from django.conf import settings
16
11
    from django.contrib.gis.tests.utils import mysql, oracle, postgis
17
12
    from django.contrib.gis.gdal import HAS_GDAL
18
13
    from django.contrib.gis.utils import HAS_GEOIP
62
57
    GeoDjango test suite.  This must be done as a database superuser for
63
58
    PostGIS, so read the docstring in `run_test()` below for more details.
64
59
    """
 
60
    from django.conf import settings
 
61
    from django.db.models import loading
65
62
    from django.contrib.gis.tests.utils import mysql
66
63
 
67
64
    # Getting initial values.
160
157
 
161
158
    Finally, the tests may be run by invoking `./manage.py test`.
162
159
    """
 
160
    from django.conf import settings
 
161
    from django.db import connection
 
162
    from django.db.models import get_app, get_apps
 
163
    from django.test.simple import build_suite, build_test
 
164
    from django.test.utils import setup_test_environment, teardown_test_environment
 
165
 
163
166
    # The `create_spatial_db` routine abstracts away all the steps needed
164
167
    # to properly construct a spatial database for the backend.
165
168
    from django.contrib.gis.db.backend import create_spatial_db