Example #1
0
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 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()
Example #3
0
 def __init__(self, db, classes, prefix):
     Datastore.__init__(self, db)
     db.datastore = self
     self.db = db
     self.classes = classes
     self.prefix = prefix
Example #4
0
 def test_unimplemented_datastore_methods(self):
     ds = Datastore(None)
     self.assertRaises(NotImplementedError, ds.put, None)
     self.assertRaises(NotImplementedError, ds.delete, None)
Example #5
0
 def __init__(self, db, classes):
     Datastore.__init__(self, db)
     db.datastore = self
     self.classes = classes