| |
@@ -37,8 +37,8 @@
|
| |
with tests.auth_set(app, None): # check_auth doesn't load in unittest
|
| |
result = self.app.get('/ralph', follow_redirects=True)
|
| |
self.assertEqual(result.status_code, 200)
|
| |
- str_expected = '<h5>Ralph</h5>'
|
| |
- self.assertTrue(str_expected in result.data)
|
| |
+ match_expected = r'<h5[^>]*>Ralph</h5>'
|
| |
+ self.assertRegexpMatches(result.data, match_expected)
|
| |
str_expected = 'Not logged in.'
|
| |
self.assertTrue(str_expected in result.data)
|
| |
|
| |
The HTML contains an attribute which causes the expected string to not
be found. This patch updates the test to use a regular expression, which
should be a tad more reliable.