I have a django 1.4 project using mysql as the backend. I have the tests setup to run in memory
if 'test' in sys.argv:
DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}
The issue is I need to use mysql functionality (full text indexes).
Is there a way to have django run MySQL in memory for testing?
My project relies on fulltext indexes. When the project is being developed on I syncdb then execute a .sql
file with the sql to create the full text indexes.
I would like to use django orm full text searching in the functions I test. I am trying to manually add the fulltext index on each tests' initialization like:
cursor.execute('alter table mytable add fulltext(one, two)')
This does not work when using sqlite (I believe because sqlite does not support Fulltext indexing)
The above sql DOES work when I remove the in memory tests. I like the speed of in memory tests. Is there a way I can run mysql in memory?
How do people test apps that rely on database specific features? like full text indexing or gis, etc... Do they have to run the tests normally on the filesystem?
Thank you