Hi All,
Why don't models within tests imported into app/tests.py get picked up
during test database creation.
from django.db import models
from django.test import TestCase
# This test defined in app/tests.py works fine...
class test_TestModel(TestCase):
class TestModel(models.Model):
name = models.CharField(max_length=200)
def test___init__(self):
test = self.TestModel(name='Test')
test.save()
self.failUnless(test and test.pk)
# Importing a test that is equivalent to the test above into app/
tests.py...
# DatabaseError: relation "testimported_testmodel" does not exist
# LINE 1: INSERT INTO "testimported_testmodel" ("name") VALUES
(E'Test...
from testimported.tests import test_TestImportedModel
The only ticked I can find that is related to this issue is:
http://code.djangoproject.com/ticket/7835 but there is no discussion
of imported tests.
Thanks!!!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.