mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
pytests: heed assertEquals deprecation warning en-masse
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
committed by
Noel Power
parent
3bc7acc626
commit
c247afbda0
@ -82,13 +82,13 @@ class DNSTest(TestCase):
|
||||
def assert_dns_rcode_equals(self, packet, rcode):
|
||||
"Helper function to check return code"
|
||||
p_errcode = packet.operation & dns.DNS_RCODE
|
||||
self.assertEquals(p_errcode, rcode, "Expected RCODE %s, got %s" %
|
||||
self.assertEqual(p_errcode, rcode, "Expected RCODE %s, got %s" %
|
||||
(self.errcodes[rcode], self.errcodes[p_errcode]))
|
||||
|
||||
def assert_dns_opcode_equals(self, packet, opcode):
|
||||
"Helper function to check opcode"
|
||||
p_opcode = packet.operation & dns.DNS_OPCODE
|
||||
self.assertEquals(p_opcode, opcode, "Expected OPCODE %s, got %s" %
|
||||
self.assertEqual(p_opcode, opcode, "Expected OPCODE %s, got %s" %
|
||||
(opcode, p_opcode))
|
||||
|
||||
def make_name_packet(self, opcode, qid=None):
|
||||
|
Reference in New Issue
Block a user