1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Raise specific exceptions

This commit is contained in:
Jeremy Stretch
2020-03-18 13:15:22 -04:00
parent 043b1c28d2
commit 70c29051b3
2 changed files with 5 additions and 5 deletions

View File

@@ -22,12 +22,12 @@ class RegistryTest(TestCase):
reg = Registry()
reg['foo'] = 123
with self.assertRaises(Exception):
with self.assertRaises(KeyError):
reg['foo'] = 456
def test_delete_store(self):
reg = Registry()
reg['foo'] = 123
with self.assertRaises(Exception):
with self.assertRaises(TypeError):
del(reg['foo'])