I can't find this anywhere, but is it possible to run a unittest from within a django view, to be output to a template? Currently if I run python manage.py test
, I get a message like "Ran 10 tests in 0.401s OK
". I would like to access this information from one of my views. Any suggestions? Thanks!
Edit: Tried, didnt work:
import StringIO
from django.core import manegement
output = StringIO.StringIO()
management.call_command('test', stdout=output)
print output.contents