From: Bob Halley Date: Sun, 26 Jul 2020 20:59:08 +0000 (-0700) Subject: increase rcode coverage X-Git-Tag: v2.1.0rc1~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4115b8619ba550dc95f5f5c18232f563ab185d3;p=thirdparty%2Fdnspython.git increase rcode coverage --- diff --git a/tests/test_flags.py b/tests/test_flags.py index 479e3846..3f5fc696 100644 --- a/tests/test_flags.py +++ b/tests/test_flags.py @@ -72,6 +72,10 @@ class FlagsTestCase(unittest.TestCase): # In TSIG text mode, it should be BADSIG self.assertEqual(dns.rcode.to_text(rcode, True), 'BADSIG') + def test_unknown_rcode(self): + with self.assertRaises(dns.rcode.UnknownRcode): + dns.rcode.Rcode.make('BOGUS') + if __name__ == '__main__': unittest.main()