jenkins-bot has submitted this change and it was merged.
Change subject: Make sure dry_site_tests is family-independent ......................................................................
Make sure dry_site_tests is family-independent
Change-Id: I9e3d2d015f34a065d85a7c81be7b23f0dcd40c33 --- M tests/dry_api_tests.py 1 file changed, 5 insertions(+), 3 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py index c204d36..0e16a17 100644 --- a/tests/dry_api_tests.py +++ b/tests/dry_api_tests.py @@ -16,13 +16,15 @@ class DryAPITests(unittest.TestCase):
def setUp(self): - self.parms = {'site': pywikibot.Site('en'), + self.basesite = pywikibot.Site('en', 'wikipedia') + self.altsite = pywikibot.Site('de', 'wikipedia') + self.parms = {'site': self.basesite, 'action': 'query', 'meta': 'userinfo'} self.req = CachedRequest(expiry=1, **self.parms) self.expreq = CachedRequest(expiry=0, **self.parms) - self.diffreq = CachedRequest(expiry=1, site=pywikibot.Site('en'), action='query', meta='siteinfo') - self.diffsite = CachedRequest(expiry=1, site=pywikibot.Site('de'), action='query', meta='userinfo') + self.diffreq = CachedRequest(expiry=1, site=self.basesite, action='query', meta='siteinfo') + self.diffsite = CachedRequest(expiry=1, site=self.altsite, action='query', meta='userinfo')
def test_expiry_formats(self): self.assertEqual(self.req.expiry, CachedRequest(datetime.timedelta(days=1), **self.parms).expiry)
pywikibot-commits@lists.wikimedia.org