[test] Fix failures due to recent oaipmh cube release
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 16 Aug 2017 18:22:17 +0200
changeset 3331 e5de53db7787
parent 3330 3b78f9dfd44f
child 3332 3b8da0f7e8e5
[test] Fix failures due to recent oaipmh cube release pyramid API is now used there for url handling instead of cubicweb's, requiring some test update.
test/test_oai.py
--- a/test/test_oai.py	Wed Aug 16 16:01:19 2017 +0200
+++ b/test/test_oai.py	Wed Aug 16 18:22:17 2017 +0200
@@ -140,7 +140,7 @@
                 ('scregneugneu', 'invalid set specifier scregneugneu'),
             ]:
                 with self.subTest(setspec=setspec):
-                    oairq = OAIRequest('http://testing.fr', setspec=setspec)
+                    oairq = OAIRequest('https://localhost:80', setspec=setspec)
                     with self.assertRaises(OAIError) as cm:
                         oairq.rset_from_setspec(req)
                     self.assertEqual(cm.exception.errors, {'noRecordsMatch': msg})
@@ -227,7 +227,7 @@
     def test_noverb(self):
         with self.admin_access.web_request() as req:
             result = self.oai_request(req)
-        self.assertIn('<request>http://testing.fr/cubicweb/oai</request>',
+        self.assertIn('<request>https://localhost:80/oai</request>',
                       result)
         self.assertIn('<error code="badVerb">no verb specified</error',
                       result)
@@ -235,7 +235,7 @@
     def test_badverb(self):
         with self.admin_access.web_request() as req:
             result = self.oai_request(req, verb='coucou')
-        self.assertIn('<request>http://testing.fr/cubicweb/oai</request>',
+        self.assertIn('<request>https://localhost:80/oai</request>',
                       result)
         self.assertIn('<error code="badVerb">illegal verb "coucou"</error>',
                       result)
@@ -246,7 +246,7 @@
         pscheme, dscheme = self._setup_schemes()
         with self.admin_access.web_request() as req:
             result = self.oai_request(req, verb='ListSets')
-        self.assertIn('<request verb="ListSets">http://testing.fr/cubicweb/oai</request>',
+        self.assertIn('<request verb="ListSets">https://localhost:80/oai</request>',
                       result)
         for spec in ('agent', 'organizationunit', 'conceptscheme', 'profile',
                      'concept'):