Python 3.13: Replace deprecated makeSuite() (#65)

The function has been deprecated in Python 3.11 and is no longer
available in Python 3.13.
This commit is contained in:
Sandro
2024-10-14 20:36:04 +02:00
committed by GitHub
parent 4a8018c2de
commit 6eedaf7717
6 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ class GreylistTestCase(unittest.TestCase):
# new one past expire
rc = grey.check('1.2.3.5','foo@bar.com','baz@spat.com',timeinc=6*3600)
self.assertEqual(rc,0)
# original past retain
# original past retain
rc = grey.check('1.2.3.4','foo@bar.com','baz@spat.com',timeinc=37*24*3600)
self.assertEqual(rc,0)
# new one for testing expire
@@ -48,8 +48,8 @@ class GreylistTestCase(unittest.TestCase):
self.assertEqual(rc,1)
grey.close()
def suite():
s = unittest.makeSuite(GreylistTestCase,'test')
def suite():
s = unittest.TestLoader().loadTestsFromTestCase(GreylistTestCase)
return s
if __name__ == '__main__':