def test_unimplemented_datastore_methods(): datastore = Datastore(None) assert datastore.db is None with raises(NotImplementedError): datastore.put(None) with raises(NotImplementedError): datastore.delete(None) assert not datastore.commit()
def __init__(self, db, classes, prefix): Datastore.__init__(self, db) db.datastore = self self.db = db self.classes = classes self.prefix = prefix
def test_unimplemented_datastore_methods(self): ds = Datastore(None) self.assertRaises(NotImplementedError, ds.put, None) self.assertRaises(NotImplementedError, ds.delete, None)
def __init__(self, db, classes): Datastore.__init__(self, db) db.datastore = self self.classes = classes