From: JINMEI Tatuya Date: Fri, 1 Jun 2012 22:03:34 +0000 (-0700) Subject: [2013] simplified a boolean expression without using unnecessary if-else. X-Git-Tag: trac2351_base~226^2~60^2^2~2^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3e3aa8bb4c6d409c2af01a72270369eb00cc03a;p=thirdparty%2Fkea.git [2013] simplified a boolean expression without using unnecessary if-else. --- diff --git a/src/bin/ddns/tests/ddns_test.py b/src/bin/ddns/tests/ddns_test.py index f1a8733ed5..76f22c2e2a 100755 --- a/src/bin/ddns/tests/ddns_test.py +++ b/src/bin/ddns/tests/ddns_test.py @@ -621,7 +621,7 @@ class TestDDNSession(unittest.TestCase): client_addr = TEST_CLIENT6 if ipv6 else TEST_CLIENT4 tsig = TSIGContext(tsig_key) if tsig_key is not None else None rcode = Rcode.NOERROR() if result == UPDATE_SUCCESS else Rcode.REFUSED() - has_response = False if result == UPDATE_DROP else True + has_response = (result != UPDATE_DROP) self.assertEqual(has_response, self.server.handle_request((self.__sock,