summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-02-14 11:29:54 +1300
committerAndrew Bartlett <abartlet@samba.org>2018-02-15 00:18:29 +0100
commit278ac393844bcbb5df7a2e2d75b878e20fba323e (patch)
tree5c1f09bb5a400e94bd7ad2b4e892ca747244c1c0 /python
parent23ec3021224d797ab9d889d8152d8d7774da0226 (diff)
downloadsamba-278ac393844bcbb5df7a2e2d75b878e20fba323e.tar.gz
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 <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/pam_winbind_warn_pwd_expire.py5
1 files changed, 3 insertions, 2 deletions
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)