Changes between Initial Version and Version 1 of Ticket #14296, comment 2
- Timestamp:
- Sep 9, 2015, 8:36:35 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #14296, comment 2
initial v1 1 1 A simple hack that seems to work for this is to modify the action of setup_databases in django/test/simple.py 2 2 {{{#!diff 3 3 def setup_databases(self, **kwargs): 4 4 from django.db import connections … … 28 28 connection.creation.create_test_db(self.verbosity, autoclobber=not self.interactive) 29 29 return old_names, mirrors 30 30 }}} 31 31 and then place the names of the connections inside the variable in your settings.py: 32 32 {{{ 33 33 RUN_TESTS_ON_LIVE_DB = ['dbname',] 34 34 }}} 35 35 This seems to force the tests to run against the live database, write operations will simply fail due to permissions and one no longer needs complex alternative db setups. 36 37 Hack..38 39