﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15285	Example in Topic/Testing refer to django.utils.unittest	kamal.mustafa@…	Gabriel Hurley	"I'm reading http://docs.djangoproject.com/en/1.2/topics/testing/ and there's example:- 

{{{
from django.utils import unittest
from myapp.models import Animal

class AnimalTestCase(unittest.TestCase):
    def setUp(self):
        self.lion = Animal.objects.create(name=""lion"", sound=""roar"")
        self.cat = Animal.objects.create(name=""cat"", sound=""meow"")

    def testSpeaking(self):
        self.assertEqual(self.lion.speak(), 'The lion says ""roar""')
        self.assertEqual(self.cat.speak(), 'The cat says ""meow""')
}}}

And this is how I installed Django:-

{{{
$ mkvirtualenv testdjango
$ pip install Django==1.2
$ python
>>> import django
>>> django.get_version()
'1.2'
>>> import django.utils.unittest
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
ImportError: No module named unittest
>>> from django.utils import unittest
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
ImportError: cannot import name unittest
}}}

Got the same result with ""pip install Django==1.2.4"""		closed	Documentation	1.2		fixed	testing		Accepted	0	0	0	0	0	0
