diff --git a/mutalyzer/util.py b/mutalyzer/util.py index 8aecc08cb0ddf516e1b1cf5fc143873a61a57466..180f179c9a12761288c53b05e9fff762cd42ab84 100644 --- a/mutalyzer/util.py +++ b/mutalyzer/util.py @@ -749,7 +749,11 @@ def monkey_patch_suds(): for the XML namespace, but the W3C seems to respond too slow on that url. We therefore use http://www.w3.org/2009/01/xml.xsd which fixes this. - Call this function before importing anything from the suds package. + Call this function before importing anything from the suds package. For + example, start your file with the following: + + import monkey; monkey.monkey_patch_suds() + from suds.client import Client """ from suds.xsd.sxbasic import Import _import_open = Import.open diff --git a/tests/test_webservice.py b/tests/test_webservice.py index dd0dc3e62c0e29dd6ffddc70bd21f8dd5c76ef90..5052cb4ac277c278ea31708df45563f32223ebaa 100644 --- a/tests/test_webservice.py +++ b/tests/test_webservice.py @@ -9,6 +9,7 @@ import os from datetime import datetime, timedelta import mutalyzer from mutalyzer.config import Config +from mutalyzer.output import Output from mutalyzer.sync import CacheSync from mutalyzer import Db import logging; logging.raiseExceptions = 0 @@ -165,13 +166,15 @@ class TestWebservice(): def test_getcache(self): """ - Running the getCache method should give us the expected cache entries. + Running the getCache method should give us the expected number of + cache entries. """ - created_since = datetime.today() - timedelta(days=60) + created_since = datetime.today() - timedelta(days=14) config = Config() database = Db.Cache(config.Db) - sync = CacheSync(config.Sync, database) + output = Output(__file__, config.Output) + sync = CacheSync(config.Retriever, output, database) cache = sync.local_cache(created_since) r = self.client.service.getCache(created_since)