Closed slurms closed 9 years ago
Hi @slurms,
django_cassandra_engine.test.TestCase
is meant to be used for testing only Cassandra models/views/functions etc. Why don't you use django.test.TestCase
if you want to test non-cassandra stuff?
It just means that say, if you do have a database alias that uses sqlite3 or other backends AND also some database aliases that use django-cassandra-engine you can easily just inherit from django-cassanda-engine's TestCase
and it all "just works" rather than any special casing.
Does that make sense? I mean, ideally we'd never even have to subclass Django's TestCase
but that looks difficult to support with the current code here. Also, there's a flag (multi-db) that suppresses acting on all databases that we might need to support (https://github.com/django/django/blob/master/django/test/testcases.py#L811)?
Yes, makes sense to me. I'll merge.
Thanks!
And deployed to pypi.
As django-cassandra-engine's
TestCase._fixture_teardown
method overrides Django's own, it ignores any databases other than its own. Similarly, no fixture setup is run either for non-cassandra databases.