[PATCH 2 of 3 saem_ref] [test/oai] Fix test failure with oaipmh 0.4.2 by adding metadataPrefix which is now mandatory

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 22 13:41:06 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1490180188 -3600
#      Wed Mar 22 11:56:28 2017 +0100
# Node ID 4463e0841ee961b9e8e9a91a99627886ebb9f34b
# Parent  7115d84ee7ec0ccc8c430d9296e13ee37e83d100
[test/oai] Fix test failure with oaipmh 0.4.2 by adding metadataPrefix which is now mandatory.

diff --git a/test/test_oai.py b/test/test_oai.py
--- a/test/test_oai.py
+++ b/test/test_oai.py
@@ -349,11 +349,12 @@ class OAIPMHViewsTC(PyramidCWTest, OAITe
             self.assertIn(
                 '<rdf:Description rdf:about="{0}">'.format(alice.url), result)
             draft = req.execute('Any A WHERE X ark A, X name "draft"')[0][0]
             self.assertNotIn(draft, result)
             result = self.oai_request(
-                req, verb='ListRecords', set='organizationunit:role:producer')
+                req, verb='ListRecords', set='organizationunit:role:producer',
+                metadataPrefix='rdf')
             self.assertIn(
                 '<rdf:Description rdf:about="{0}">'.format(alice.url), result)
             self.assertNotIn(bobby.url, result)
 
     @no_validate_xml


More information about the saem-devel mailing list