mirror of https://github.com/fail2ban/fail2ban
BF(PY26): no assertGreater in 2.6 -- use explicit comparison
parent
17a4289798
commit
84afcd8b1f
|
@ -168,9 +168,9 @@ class Transmitter(TransmitterBase):
|
|||
t0 = time.time()
|
||||
self.assertEqual(self.transm.proceed(["sleep", "1"]), (0, None))
|
||||
t1 = time.time()
|
||||
# Approx 1 second delay
|
||||
self.assertGreater(t1 - t0, 0.99) # shouldn't be faster than 1sec
|
||||
self.assertGreater(1.1, t1 - t0)
|
||||
# Approx 1 second delay but not faster
|
||||
dt = t1 - t0
|
||||
self.assertTrue(0.99 < dt < 1.1, msg="Sleep was %g sec" % dt)
|
||||
|
||||
def testDatabase(self):
|
||||
tmp, tmpFilename = tempfile.mkstemp(".db", "fail2ban_")
|
||||
|
|
Loading…
Reference in New Issue