doctests in mock_django/models.py fails #1

Closed
calvinchengx opened this Issue Feb 20, 2012 · 2 comments

Projects

None yet

2 participants

@calvinchengx
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 "<doctest mock_django.models.ModelMock[0]>", line 1, in <module>
        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 "<doctest mock_django.models.ModelMock[1]>", line 1, in <module>
        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?

@dcramer
Owner
dcramer commented Feb 20, 2012

Did you put mock_django in your installed apps? If so just remove it from there.

They aren't actually doctests :)

David Cramer

twitter.com/zeeg
disqus.com/zeeg

On Sunday, February 19, 2012 at 11:37 PM, Calvin Cheng wrote:

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 "<doctest mock_django.models.ModelMock[0]>", line 1, in <module>
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 (http://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 "<doctest mock_django.models.ModelMock[1]>", line 1, in <module>
assert post.pk (http://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?


Reply to this email directly or view it on GitHub:
#1

@calvinchengx

O! Thanks for clarifying!

Sent from my iPhone

On 20 Feb, 2012, at 16:44, David Cramerreply@reply.github.com wrote:

Did you put mock_django in your installed apps? If so just remove it from there.

They aren't actually doctests :)

David Cramer

twitter.com/zeeg
disqus.com/zeeg

On Sunday, February 19, 2012 at 11:37 PM, Calvin Cheng wrote:

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 "<doctest mock_django.models.ModelMock[0]>", line 1, in <module>
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 (http://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 "<doctest mock_django.models.ModelMock[1]>", line 1, in <module>
assert post.pk (http://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?


Reply to this email directly or view it on GitHub:
#1


Reply to this email directly or view it on GitHub:
#1 (comment)

@dcramer dcramer closed this Feb 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment