[PATCH saem] [test] Drop some pre 3.25 compat

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Oct 31 17:55:41 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1509459882 -3600
#      Tue Oct 31 15:24:42 2017 +0100
# Node ID 620deae2c654232cd520d027d2807df451438e5b
# Parent  021181ca772dc9dae81cd4205aebb8482056fc31
# Available At http://hg.logilab.org/review/cubes/saem_ref
#              hg pull http://hg.logilab.org/review/cubes/saem_ref -r 620deae2c654
[test] Drop some pre 3.25 compat

diff --git a/test/test_oai.py b/test/test_oai.py
--- a/test/test_oai.py
+++ b/test/test_oai.py
@@ -21,22 +21,19 @@ import time
 
 from dateutil.parser import parse as parse_date
 from lxml import etree
 import pytz
 
-from cubicweb import __pkginfo__
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.pyramid.test import PyramidCWTest
 
 from cubes.oaipmh.views import OAIError, OAIRequest
 
 from cubicweb_saem_ref import permanent_url
 
 import testutils
 
-CW_324 = __pkginfo__.numversion < (3, 25)
-
 EntityInfo = namedtuple('EntityInfo', ['ark', 'url', 'eid'])
 
 
 def publish_entity(entity):
     """Fire "publish" transition for `entity`."""
@@ -168,18 +165,10 @@ class OAIPMHViewsTC(PyramidCWTest, OAITe
     }
 
     _validate_xml = True
     _debug_xml = False
 
-    if CW_324:
-        # webapp is initialized with https as url scheme, which trigger usage of https-url instead
-        # of base-url in 3.24, but tests below rely in base-url being used.
-        @classmethod
-        def init_config(cls, config):
-            super(PyramidCWTest, cls).init_config(config)
-            config.global_set_option('https-url', config['base-url'])
-
     def oai_request(self, req, **formparams):
         response = self.webapp.get('/oai', formparams)
         self.assertEqual(response.headers['Content-Type'], 'text/xml; charset=UTF-8')
         if self._validate_xml:
             self.assertXmlValid(response.body, self.datapath('OAI-PMH.xsd'),


More information about the saem-devel mailing list