diff options
| author | Chris McDonough <chrism@plope.com> | 2011-01-30 18:17:15 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-01-30 18:17:15 -0500 |
| commit | 89335fd705ac7e179c243c1758294c605600a781 (patch) | |
| tree | 35b740503800c8d80700411ae1ed13a8561aa82c | |
| parent | ed49204f6055e393d925828da05fa827544a668b (diff) | |
| download | pyramid-89335fd705ac7e179c243c1758294c605600a781.tar.gz pyramid-89335fd705ac7e179c243c1758294c605600a781.tar.bz2 pyramid-89335fd705ac7e179c243c1758294c605600a781.zip | |
make pass predictably on jython
| -rw-r--r-- | pyramid/tests/test_config.py | 10 | ||||
| -rw-r--r-- | pyramid/tests/test_router.py | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/pyramid/tests/test_config.py b/pyramid/tests/test_config.py index 9ce698cfe..9f3f39fb3 100644 --- a/pyramid/tests/test_config.py +++ b/pyramid/tests/test_config.py @@ -2923,11 +2923,11 @@ class ConfiguratorTests(unittest.TestCase): for conflict in conflicts: for confinst in conflict: yield confinst[3] - c1, c2, c3, c4 = scanconflicts(why) - self.assertEqual(c1, "@view_config(renderer='string')") - self.assertEqual(c2, "@view_config(renderer='string')") - self.assertEqual(c3, "@view_config(name='two', renderer='string')") - self.assertEqual(c4, "@view_config(name='two', renderer='string')") + which = list(scanconflicts(why)) + self.assertEqual(len(which), 4) + self.failUnless("@view_config(renderer='string')" in which) + self.failUnless("@view_config(name='two', renderer='string')" in + which) def _conflictFunctions(self, e): conflicts = e._conflicts.values() diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py index 95fbfa9b6..5871067bd 100644 --- a/pyramid/tests/test_router.py +++ b/pyramid/tests/test_router.py @@ -528,14 +528,13 @@ class TestRouter(unittest.TestCase): self.assertEqual(request.matched_route.name, 'foo') self.assertEqual(len(logger.messages), 1) - self.assertEqual(logger.messages[0], + self.failUnless( + logger.messages[0].startswith( "route matched for url http://localhost:8080" "/archives/action1/article1; " "route_name: 'foo', " "path_info: '/archives/action1/article1', " - "pattern: 'archives/:action/:article', " - "matchdict: {'action': u'action1', 'article': u'article1'}, " - "predicates: ()") + "pattern: 'archives/:action/:article', ")) def test_call_route_match_miss_debug_routematch(self): from pyramid.exceptions import NotFound |
