jenkins-bot has submitted this change and it was merged.
Change subject: IA tests: remove trailing slashes and clarify output ......................................................................
IA tests: remove trailing slashes and clarify output
both www.google.com and www.google.com/ are valid responses; show clearer error message (including the returned url) when test fails
Change-Id: I938bbede4232cc201bbca88629d70432f129823c --- M tests/weblib_tests.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/weblib_tests.py b/tests/weblib_tests.py index 08c4804..fd8e13b 100644 --- a/tests/weblib_tests.py +++ b/tests/weblib_tests.py @@ -17,14 +17,14 @@ parsed = urlparse(archivedversion) self.assertIn(parsed.scheme, [u'http', u'https']) self.assertEqual(parsed.netloc, u'web.archive.org') - self.assertTrue(parsed.path.endswith('www.google.com/')) + self.assertTrue(parsed.path.strip('/').endswith('www.google.com'), parsed.path)
def testInternetArchiveOlder(self): archivedversion = weblib.getInternetArchiveURL('http://google.com', '200606') parsed = urlparse(archivedversion) self.assertIn(parsed.scheme, [u'http', u'https']) self.assertEqual(parsed.netloc, u'web.archive.org') - self.assertTrue(parsed.path.endswith('www.google.com/')) + self.assertTrue(parsed.path.strip('/').endswith('www.google.com'), parsed.path) self.assertIn('200606', parsed.path)
def testWebCiteOlder(self):