Hi,

upgrading to Django 1.3.1 somehow breaks my unit tests.

I'm using django.contrib.gis.db.backends.spatialite as a database
engine with two databases;

DATABASES = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.spatialite',
        'NAME': 'sqlite.db',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    },
    'geonames': {
        'ENGINE': 'django.contrib.gis.db.backends.spatialite',
        'NAME': 'geonames.db',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}


Runserver works fine, but when I try to run some tests following error
occurs:

Installing custom SQL ...
Installing indexes ...
No fixtures found.
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
south/management/commands/test.py", line 8, in handle
    super(Command, self).handle(*args, **kwargs)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/core/management/commands/test.py", line 37, in handle
    failures = test_runner.run_tests(test_labels)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/test/simple.py", line 359, in run_tests
    old_config = self.setup_databases()
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/test/simple.py", line 296, in setup_databases
    test_db_name = connection.creation.create_test_db(self.verbosity,
autoclobber=not self.interactive)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/contrib/gis/db/backends/spatialite/creation.py", line 64, in
create_test_db
    if Site is not None and
Site.objects.using(self.connection.alias).count() == 1:
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/db/models/query.py", line 334, in count
    return self.query.get_count(using=self.db)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/db/models/sql/query.py", line 401, in get_count
    number = obj.get_aggregation(using=using)[None]
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/db/models/sql/query.py", line 367, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/db/models/sql/compiler.py", line 735, in execute_sql
    cursor.execute(sql, params)
  File "/home/flo/.virtualenvs/django/lib/python2.7/site-packages/
django/db/backends/sqlite3/base.py", line 234, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: django_site


Did anybody experience something similar?

Cheers,
Flo

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to