django-extensions/django-extensions — Issue #149: test fails
Author: calvinchengx
Created: 2011-11-15 04:39:39+00:00
State: open

Any idea why there are models.py in django_extensions' tests directory? (which doesn't get created by syncdb of course and hence resulting in this test failure)

calvin$ ./manage.py test django_extensions
Creating test database for alias 'default'...
E...........
======================================================================
ERROR: test_runs (django_extensions.tests.test_dumpscript.DumpScriptTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/calvin/.virtualenvs/booking/src/django-extensions/django_extensions/tests/test_dumpscript.py", line 18, in test_runs
n.save()
File "/Users/calvin/.virtualenvs/booking/src/django/django/db/models/base.py", line 464, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/Users/calvin/.virtualenvs/booking/src/django/django/db/models/base.py", line 552, in save_base
result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/Users/calvin/.virtualenvs/booking/src/django/django/db/models/manager.py", line 203, in _insert
return insert_query(self.model, objs, fields, **kwargs)
File "/Users/calvin/.virtualenvs/booking/src/django/django/db/models/query.py", line 1556, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/Users/calvin/.virtualenvs/booking/src/django/django/db/models/sql/compiler.py", line 848, in execute_sql
cursor.execute(sql, params)
File "/Users/calvin/.virtualenvs/booking/src/django/django/db/backends/postgresql_psycopg2/base.py", line 46, in execute
return self.cursor.execute(query, args)
DatabaseError: relation "tests_name" does not exist
LINE 1: INSERT INTO "tests_name" ("name") VALUES (E'Gabriel') RETURN...
^

----------------------------------------------------------------------
Ran 12 tests in 1.027s

FAILED (errors=1)
Destroying test database for alias 'default'...