Hi,
http://docs.djangoproject.com/en/dev/topics/testing/#multi-database-support
tells me to add "multi_db = True" to my unittest TestCase class to get
multi db support.
I'm using a doctest, however, and I can't figure out how to set that for
my doctest. Anyone know how to get that working? My tests.py looks
like this:
===================
import doctest
import unittest
def suite():
"""Return test suite
This method is automatically called by django's test mechanism.
"""
suite = unittest.TestSuite()
doctests = doctest.DocFileSuite(
'USAGE.txt',
'models.txt',
module_relative=True,
optionflags=(doctest.NORMALIZE_WHITESPACE |
doctest.ELLIPSIS |
doctest.REPORT_NDIFF))
# Multi db hack, I cannot set the multi_db to true otherwise.
for test in doctests._tests:
test.multi_db = True
# End of hack, which doesn't work anyway...
suite.addTest(doctests)
return suite
=================
Reinout
--
Reinout van Rees - rein...@vanrees.org - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@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.