dcramer/mock-django — Issue #1: doctests in mock_django/models.py fails
Author: calvinchengx
Created: 2012-02-20 07:37:01+00:00
State: open

```
calvin$ ./manage.py test mock_django
Creating test database for alias 'default'...
F
======================================================================
FAIL: ModelMock (mock_django.models)
Doctest: mock_django.models.ModelMock
----------------------------------------------------------------------
Traceback (most recent call last):
File "./../django-trunk/django/test/_doctest.py", line 2136, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for mock_django.models.ModelMock
File "./_thirdparty/mock-django/mock_django/models.py", line 23, in ModelMock

----------------------------------------------------------------------
File "./_thirdparty/mock-django/mock_django/models.py", line 25, in mock_django.models.ModelMock
Failed example:
Post = ModelMock(Post)
Exception raised:
Traceback (most recent call last):
File "./../django-trunk/django/test/_doctest.py", line 1235, in __run
compileflags, 1) in test.globs
File "", line 1, in
Post = ModelMock(Post)
NameError: name 'Post' is not defined
----------------------------------------------------------------------
File "./_thirdparty/mock-django/mock_django/models.py", line 26, in mock_django.models.ModelMock
Failed example:
assert post.pk == post.id
Exception raised:
Traceback (most recent call last):
File "./../django-trunk/django/test/_doctest.py", line 1235, in __run
compileflags, 1) in test.globs
File "", line 1, in
assert post.pk == post.id
NameError: name 'post' is not defined

----------------------------------------------------------------------
Ran 1 test in 0.008s

FAILED (failures=1)
Destroying test database for alias 'default'...
```

Seems like the doctest is giving some trouble?