From: Andrew Bartlett Date: Tue, 13 Feb 2018 22:29:54 +0000 (+1300) Subject: selftest: Avoid a build started around midnight failing (again) X-Git-Tag: tevent-0.9.36~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=278ac393844bcbb5df7a2e2d75b878e20fba323e;p=thirdparty%2Fsamba.git selftest: Avoid a build started around midnight failing (again) This case most likely relates to Daylight Saving changes creating a 23 hour day. Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/tests/pam_winbind_warn_pwd_expire.py b/python/samba/tests/pam_winbind_warn_pwd_expire.py index b3d2a9fd11e..c573657c4dd 100644 --- a/python/samba/tests/pam_winbind_warn_pwd_expire.py +++ b/python/samba/tests/pam_winbind_warn_pwd_expire.py @@ -36,9 +36,10 @@ class PasswordExpirePamTests(samba.tests.TestCase): if warn_pwd_expire == 0: self.assertTrue(res.info == ()) elif warn_pwd_expire == 50: - # This is needed as otherwise a build started just before + # This is needed as otherwise a build started around # midnight can fail - if (res.info[0] != u"Your password will expire in 41 days.\n"): + if (res.info[0] != u"Your password will expire in 41 days.\n") and \ + (res.info[0] != u"Your password will expire in 43 days.\n"): self.assertEqual(res.info[0], u"Your password will expire in 42 days.\n") else: self.assertEqual(warn_pwd_expire, 0)