This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Raise exceptions when testing

  • Loading branch information...
kumar303 committed May 2, 2012
1 parent ce1b45d commit 11ae979ee0b5b42f43e37a957d4b11659ad83705
Showing with 6 additions and 1 deletion.
  1. +2 −0 apps/paypal/views.py
  2. +3 −0 lib/settings_base.py
  3. +1 −1 settings_test.py
View
@@ -41,6 +41,8 @@ def paypal(request):
return _paypal(request)
except Exception, e:
paypal_log.error('%s\n%s' % (e, request), exc_info=True)
+ if settings.IN_TEST_SUITE:
+ raise
return http.HttpResponseServerError('Unknown error.')
View
@@ -1440,3 +1440,6 @@ def read_only_mode(env):
SIGNING_SERVER = ''
# And how long we'll give the server to respond.
SIGNING_SERVER_TIMEOUT = 10
+
+# True when the Django app is running from the test suite.
+IN_TEST_SUITE = False
View
@@ -26,8 +26,8 @@ def _polite_tmpdir():
_tmpdirs.add(tmp)
return tmp
-
# See settings.py for documentation:
+IN_TEST_SUITE = True
NETAPP_STORAGE = _polite_tmpdir()
ADDONS_PATH = _polite_tmpdir()
PERSONAS_PATH = _polite_tmpdir()

0 comments on commit 11ae979

Please sign in to comment.