selftest: Avoid a build started just before midnight failing
authorMartin Schwenke <martin@meltin.net>
Mon, 18 Sep 2017 22:33:11 +0000 (08:33 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 19 Sep 2017 03:32:22 +0000 (05:32 +0200)
It looks like commit 070f24bc9d2 was incomplete because it doesn't
match on the trailing fullstop and newline.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Sep 19 05:32:22 CEST 2017 on sn-devel-144

python/samba/tests/pam_winbind_warn_pwd_expire.py

index 2567f98c6d4a181ab682d8109748dabb5941ba80..b3d2a9fd11e15e1fe376dd4770ae651030f58d02 100644 (file)
@@ -38,7 +38,7 @@ class PasswordExpirePamTests(samba.tests.TestCase):
         elif warn_pwd_expire == 50:
             # This is needed as otherwise a build started just before
             # midnight can fail
-            if (res.info[0] != u"Your password will expire in 41 days"):
+            if (res.info[0] != u"Your password will expire in 41 days.\n"):
                 self.assertEqual(res.info[0], u"Your password will expire in 42 days.\n")
         else:
             self.assertEqual(warn_pwd_expire, 0)