예제 #1
0
 def test_last(self):
     o = Object()
     o.bla = "test"
     o.save()
     oo = Object()
     last(oo)
     self.assertEqual(oo.bla, "test")
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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")
예제 #5
0
 def test_attribute(self):
     o = Object()
     o.bla = "test"
     p = o.save()
     oo = Object()
     oo.load(p)
     self.assertEqual(oo.bla, "test")
예제 #6
0
 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")
예제 #7
0
 def test_stamp(self):
     o = Object()
     o.save()
     self.assertTrue(o.__stp__)