(DatabaseError: no such table: django_session) ERROR during Django 1.3 selenium testing -
i'm trying use django selenium testing django1.3 application. database backend testing sqlite3.
here snippet of settings file.
if 'test' in sys.argv: db_engine = 'django.db.backends.sqlite3' databases = { 'default': { 'engine': 'django.db.backends.sqlite3', 'test_name': ':memory:', 'name': 'database_one', }, 'database_two': { 'engine': 'django.db.backends.sqlite3', ] 'test_name': ':memory:', 'name': 'database_two', }, 'database_three': { 'engine': 'django.db.backends.sqlite3', 'test_name': ':memory:', 'name': 'database_three', }, } south_tests_migrate = false
when run selenium tests, error saying
databaseerror: no such table: django_session error
as matter of fact shows during test creation tables created in output follows,
creating test database alias 'default' (':memory:')... creating tables ... creating table django_content_type creating table auth_permission creating table auth_group_permissions creating table auth_group creating table auth_user_user_permissions creating table auth_user_groups creating table auth_user creating table auth_message creating table django_session
i literally stuck here cannot find elsewhere.
ps: test work fine in postgres (my actual prod db engine) want use sqlite3 postgres takes lot of time setup & teardown db when running tests..
thanks in advance :)
if in memory(like in example), second closed, data disappears.
make actual db file, solve problem. can giving absolute path file, if there not happen one, create 1 you.
Comments
Post a Comment