diff --git a/cinderlib/persistence/base.py b/cinderlib/persistence/base.py index 072c44a..5bd1dc8 100644 --- a/cinderlib/persistence/base.py +++ b/cinderlib/persistence/base.py @@ -34,20 +34,20 @@ class PersistenceDriverBase(object): @property def db(self): - raise NotImplemented() + raise NotImplementedError() def get_volumes(self, volume_id=None, volume_name=None, backend_name=None): - raise NotImplemented() + raise NotImplementedError() def get_snapshots(self, snapshot_id=None, snapshot_name=None, volume_id=None): - raise NotImplemented() + raise NotImplementedError() def get_connections(self, connection_id=None, volume_id=None): - raise NotImplemented() + raise NotImplementedError() def get_key_values(self, key): - raise NotImplemented() + raise NotImplementedError() def set_volume(self, volume): self.reset_change_tracker(volume) diff --git a/tests/unit/persistence/base.py b/tests/unit/persistence/base.py index b4cad4b..1180ea6 100644 --- a/tests/unit/persistence/base.py +++ b/tests/unit/persistence/base.py @@ -115,10 +115,10 @@ class BasePersistenceTest(unittest2.TestCase): self.assertDictEqual(exp, act) def test_db(self): - raise NotImplemented('Test class must implement this method') + raise NotImplementedError('Test class must implement this method') def test_set_volume(self): - raise NotImplemented('Test class must implement this method') + raise NotImplementedError('Test class must implement this method') def test_get_volumes_all(self): vols = self.create_n_volumes(2) @@ -199,7 +199,7 @@ class BasePersistenceTest(unittest2.TestCase): self.assertListEqualObj(vols, self.sorted(res)) def test_set_snapshot(self): - raise NotImplemented('Test class must implement this method') + raise NotImplementedError('Test class must implement this method') def get_snapshots_all(self): snaps = self.create_snapshots() @@ -277,7 +277,7 @@ class BasePersistenceTest(unittest2.TestCase): self.assertListEqualObj(snaps, self.sorted(res)) def test_set_connection(self): - raise NotImplemented('Test class must implement this method') + raise NotImplementedError('Test class must implement this method') def get_connections_all(self): conns = self.create_connections() @@ -341,7 +341,7 @@ class BasePersistenceTest(unittest2.TestCase): self.assertListEqualObj(conns, self.sorted(res)) def test_set_key_values(self): - raise NotImplemented('Test class must implement this method') + raise NotImplementedError('Test class must implement this method') def assertKVsEqual(self, expected, actual): if len(expected) == len(actual):