Can't find how to add predefined data to the db..... Sorry for being silly, maybe someone can point me? Please
On Wed, Jan 28, 2009 at 2:45 AM, Russell Keith-Magee <freakboy3...@gmail.com > wrote: > > On Wed, Jan 28, 2009 at 5:51 AM, Oleg Oltar <oltarase...@gmail.com> wrote: > > Hi! > > I am trying to create few nose test for my application. > > I need to test registration/login, so want to create a test sqlite3 > > database, and pre-populate it with some data. > > No sure how to do it. > > I created a setup method: > > def setup(): > > setup_test_environment() > > create_test_db() > > But getting an exception on from django.db.backends.creation import > > create_test_db.... > > create_test_db() is a method on creation object, not a method to be > imported from the creation module. Invocation is: > > from django.db import connection > connection.creation.create_test_db() > > See django.test.simple.run_tests() for a full working example. > > Yours > Russ Magee %-) > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---