def test_last(self): o = Object() o.bla = "test" o.save() oo = Object() last(oo) self.assertEqual(oo.bla, "test")
def test_last2(self): o = Object() o.save() uuid1 = o.__stp__.split(os.sep)[1] last(o) uuid2 = o.__stp__.split(os.sep)[1] self.assertEqual(uuid1, uuid2)
def test_uuid(self): o = Object() p = o.save() uuid1 = p.split(os.sep)[1] p = o.save() uuid2 = p.split(os.sep)[1] self.assertEqual(uuid1, uuid2)
def test_changeattr(self): o = Object() o.bla = "test" p = o.save() oo = Object() oo.load(p) oo.bla = "mekker" pp = oo.save() ooo = Object() ooo.load(pp) self.assertEqual(ooo.bla, "mekker")
def test_attribute(self): o = Object() o.bla = "test" p = o.save() oo = Object() oo.load(p) self.assertEqual(oo.bla, "test")
def test_nested(self): o = Object() o.o = Object() o.o.o = Object() o.o.o.test = "bla" p = o.save() oo = Object() oo.load(p) self.assertEqual(o.o.o.test, "bla")
def test_stamp(self): o = Object() o.save() self.assertTrue(o.__stp__)