From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:28:52 +0000 (-0500) Subject: Use assertIn X-Git-Tag: rec-5.4.0-beta1~54^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16701%2Fhead;p=thirdparty%2Fpdns.git Use assertIn Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- diff --git a/regression-tests.api/test_Zones.py b/regression-tests.api/test_Zones.py index 9d410b1988..25db863a3e 100644 --- a/regression-tests.api/test_Zones.py +++ b/regression-tests.api/test_Zones.py @@ -1718,8 +1718,8 @@ $NAME$ 1D IN SOA ns1.example.org. hostmaster.example.org. ( # note that we can't assume anything about the order of the records records = get_rrset(data1, 'a.' + name, 'A')['records'] self.assertEqual(len(records), 2) - self.assertTrue(a1 in records) - self.assertTrue(a3 in records) + self.assertIn(a1, records) + self.assertIn(a3, records) # get_rrset above has removed the timestamps from data1, fetch the # zone again, since we want to ensure the following operations do # not change anything. @@ -1817,9 +1817,9 @@ $NAME$ 1D IN SOA ns1.example.org. hostmaster.example.org. ( # note that we can't assume anything about the order of the records records = get_rrset(data, 'a.' + name, 'A')['records'] self.assertEqual(len(records), 3) - self.assertTrue(a1 in records) - self.assertTrue(a2 in records) - self.assertTrue(a4 in records) + self.assertIn(a1, records) + self.assertIn(a2, records) + self.assertIn(a4, records) def test_zone_disable_reenable(self): # This also tests that SOA-EDIT-API works.