Browse files

Merge "Makes failing mox test output 10x easier to decipher."

  • Loading branch information...
2 parents 64e1bc4 + df8fdd2 commit f4c7374580618725b851e27063d3b631e48c5879 Jenkins committed with openstack-gerrit Jan 27, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 horizon/horizon/
@@ -24,6 +24,7 @@
from django import test as django_test
from django.conf import settings
from import default_storage
+from django.core.handlers import wsgi
from django.test.client import RequestFactory
import httplib2
import mox
@@ -37,6 +38,10 @@
from .time import utcnow
+# Makes output of failing mox tests much easier to read.
+wsgi.WSGIRequest.__repr__ = lambda self: "<class 'django.http.HttpRequest'>"
class RequestFactoryWithMessages(RequestFactory):
def post(self, *args, **kwargs):
req = super(RequestFactoryWithMessages, self).post(*args, **kwargs)

0 comments on commit f4c7374

Please sign in to comment.