diff options
| author | Brian Wellington <bwelling@xbill.org> | 2020-03-18 11:26:55 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2020-03-18 11:26:55 -0700 |
| commit | e6798e58b4555740db4cfb43c8b9ce0d7d3416f1 (patch) | |
| tree | 7a2a5286ca49e0fe814eef39082a6d59b3d7289a /tests/test_update.py | |
| parent | fc74c9261dcd36fd1ec0f10d48c9c0fc56ce17ea (diff) | |
| download | dnspython-e6798e58b4555740db4cfb43c8b9ce0d7d3416f1.tar.gz | |
Improve assertion checking.
This replaces lots of self.assertTrue() assertions with more specific
assertions, such as replacing assertTrue(x == y) with assertEqual(x, y).
Diffstat (limited to 'tests/test_update.py')
| -rw-r--r-- | tests/test_update.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_update.py b/tests/test_update.py index 73e7acb..b2c4767 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -75,7 +75,7 @@ class UpdateTestCase(unittest.TestCase): update.delete('bar', 'a', '10.0.0.4') update.delete('blaz', 'a') update.delete('blaz2') - self.assertTrue(update.to_wire() == goodwire) + self.assertEqual(update.to_wire(), goodwire) def test_to_wire2(self): # type: () -> None update = dns.update.Update('example') @@ -90,7 +90,7 @@ class UpdateTestCase(unittest.TestCase): update.delete('bar', 'a', '10.0.0.4') update.delete('blaz', 'a') update.delete('blaz2') - self.assertTrue(update.to_wire() == goodwire) + self.assertEqual(update.to_wire(), goodwire) def test_to_wire3(self): # type: () -> None update = dns.update.Update('example') @@ -105,13 +105,13 @@ class UpdateTestCase(unittest.TestCase): update.delete('bar', 'a', '10.0.0.4') update.delete('blaz', 'a') update.delete('blaz2') - self.assertTrue(update.to_wire() == goodwire) + self.assertEqual(update.to_wire(), goodwire) def test_from_text1(self): # type: () -> None update = dns.message.from_text(update_text) w = update.to_wire(origin=dns.name.from_text('example'), want_shuffle=False) - self.assertTrue(w == goodwire) + self.assertEqual(w, goodwire) if __name__ == '__main__': unittest.main() |
