def setUp(self): self.m1 = JsonTestModel(s="string1", i=1, b=True, l=["foo1", "bar1"]) self.m1.put() self.m2 = JsonTestModel(s="string2", i=2, b=False, l=["foo2", "bar2"], r=self.m1) self.m2.put()
class DumpModelTestCase(GAETestBase): KIND_NAME_UNSWAPPED = False USE_PRODUCTION_STUBS = True CLEANUP_USED_KIND = True def setUp(self): self.m1 = JsonTestModel(s="string1", i=1, b=True, l=["foo1","bar1"]) self.m1.put() self.m2 = JsonTestModel(s="string2", i=2, b=False, l=["foo2","bar2"], r=self.m1) self.m2.put() def test_to_dict(self): d1 = to_dict(self.m1) d2 = to_dict(self.m2) self.assertEqual(d1["s"], self.m1.s) self.assertEqual(d1["i"], self.m1.i) self.assertEqual(d1["b"], self.m1.b) self.assertEqual(d1["l"], self.m1.l) self.assertEqual(d2["r"], d1)
class DumpModelTestCase(GAETestBase): KIND_NAME_UNSWAPPED = False USE_PRODUCTION_STUBS = True CLEANUP_USED_KIND = True def setUp(self): self.m1 = JsonTestModel(s="string1", i=1, b=True, l=["foo1", "bar1"]) self.m1.put() self.m2 = JsonTestModel(s="string2", i=2, b=False, l=["foo2", "bar2"], r=self.m1) self.m2.put() def test_to_dict(self): d1 = to_dict(self.m1) d2 = to_dict(self.m2) self.assertEqual(d1["s"], self.m1.s) self.assertEqual(d1["i"], self.m1.i) self.assertEqual(d1["b"], self.m1.b) self.assertEqual(d1["l"], self.m1.l) self.assertEqual(d2["r"], d1)
def setUp(self): self.m1 = JsonTestModel(s="string1", i=1, b=True, l=["foo1","bar1"]) self.m1.put() self.m2 = JsonTestModel(s="string2", i=2, b=False, l=["foo2","bar2"], r=self.m1) self.m2.put()