0

I get this over and over again after running manage.py test:

    ERROR 4280 140735184636256 base: Internal Server Error: /add/error/
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/Library/Python/2.7/site-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/django/contrib/messages/tests/urls.py", line 30, in add
    getattr(messages, message_type)(request, msg)
  File "/Library/Python/2.7/site-packages/django/contrib/messages/api.py", line 102, in error
    fail_silently=fail_silently)
  File "/Library/Python/2.7/site-packages/django/contrib/messages/api.py", line 22, in add_message
    raise MessageFailure('You cannot add messages without installing '
MessageFailure: You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware

MessageMiddleware is enabled in my settings.py so not sure why. Any clue?

4

1 回答 1

0

您正在运行所有已定义的测试,包括 django 自己的测试。指定要测试的模块:

python manage.py test my_app my_other_app
于 2013-07-28T08:06:53.717 回答