Python 3.12: use assertAlmostEqual

The old failUnlessAlmostEqual is removed from Python 3.12. Let's
use assertAlmostEqual instead.

Change-Id: I25c4d43c580d9b101be5ed3e0e23fead704b09f0
This commit is contained in:
Thomas Goirand 2023-12-17 22:22:54 +01:00
parent 357f62cf97
commit eb12c770cc
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ class LimiterTest(BaseLimitTestSuite):
expected = 60.0 / 7.0
results = self._check_sum(1, "POST", "/anything")
self.failUnlessAlmostEqual(expected, results, 8)
self.assertAlmostEqual(expected, results, 8)
def test_delay_GET(self):
"""Ensure the 11th GET will result in NO delay."""