diff options
| author | Richard Barrell <rchrd@brrll.co.uk> | 2011-11-08 16:54:57 -0800 |
|---|---|---|
| committer | Richard Barrell <rchrd@brrll.co.uk> | 2011-11-08 16:54:57 -0800 |
| commit | d55ba532da4eb5a8c5d48f94397dcdd85ea785ea (patch) | |
| tree | 78235e956c66f28cb92ee1470ca448fe129d4f4b | |
| parent | 45b15a8fb327d18078b29f9517bdd08aec366a7b (diff) | |
| download | pyramid-d55ba532da4eb5a8c5d48f94397dcdd85ea785ea.tar.gz pyramid-d55ba532da4eb5a8c5d48f94397dcdd85ea785ea.tar.bz2 pyramid-d55ba532da4eb5a8c5d48f94397dcdd85ea785ea.zip | |
Rewrite my unit test to behave correctly w.r.t. different exception types.
| -rw-r--r-- | pyramid/tests/test_httpexceptions.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pyramid/tests/test_httpexceptions.py b/pyramid/tests/test_httpexceptions.py index d319a59a0..2cbe208cd 100644 --- a/pyramid/tests/test_httpexceptions.py +++ b/pyramid/tests/test_httpexceptions.py @@ -298,11 +298,8 @@ class Test_HTTPMove(unittest.TestCase): """ Constructing a HTTPMove instance with location=None should throw a ValueError from __init__ so that a more-confusing exception won't be thrown later from .prepare(environ) """ - try: + with self.assertRaises(ValueError): exc = self._makeOne(location=None) - self.assertEqual(1, 0) - except ValueError, e: - pass def test_it_location_not_passed(self): exc = self._makeOne() |
