예제 #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()
예제 #2
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()
예제 #3
0
파일: datastore.py 프로젝트: nfusionz/whyis
 def __init__(self, db, classes, prefix):
     Datastore.__init__(self, db)
     db.datastore = self
     self.db = db
     self.classes = classes
     self.prefix = prefix
예제 #4
0
 def test_unimplemented_datastore_methods(self):
     ds = Datastore(None)
     self.assertRaises(NotImplementedError, ds.put, None)
     self.assertRaises(NotImplementedError, ds.delete, None)
예제 #5
0
 def __init__(self, db, classes):
     Datastore.__init__(self, db)
     db.datastore = self
     self.classes = classes