예제 #1
0
 def setUp(self):
     self.app = db_app.app_db()
     r=self.app.root()
 
     # create three levels of entries
     level1 = 5
     level2 = 5
     level3_1 = 5
     level3_2 = 5
     c=r
     ids=[]
     n=0
     user = User(u"test")
     for i in range(0,level1):
         o=db_app.createObj1(c)
         n+=1
         ids.append(o.id)
         for i2 in range(0,level2):
             o2=db_app.createObj1(o)
             n+=1
             for i3 in range(0,level3_1):
                 db_app.createObj1(o2)
                 n+=1
             for i3 in range(0,level3_2):
                 o4 = db_app.createObj2(o2)
                 id = o4.id
                 n+=1
     self.ids = ids
     self.lastid = id
예제 #2
0
    def setUp(self):
        self.app = db_app.app_db()
        r = self.app.root()

        # create three levels of entries
        level1 = 5
        level2 = 5
        level3_1 = 5
        level3_2 = 5
        c = r
        ids = []
        n = 0
        user = User(u"test")
        for i in range(0, level1):
            o = db_app.createObj1(c)
            n += 1
            ids.append(o.id)
            for i2 in range(0, level2):
                o2 = db_app.createObj1(o)
                n += 1
                for i3 in range(0, level3_1):
                    db_app.createObj1(o2)
                    n += 1
                for i3 in range(0, level3_2):
                    o4 = db_app.createObj2(o2)
                    id = o4.id
                    n += 1
        self.ids = ids
        self.lastid = id
예제 #3
0
 def test_toolobj(self):
     user = User(u"test")
     r = self.app.root()
     o = db_app.createObj1(r)
     t = o.GetTool("nive.components.tools.example")
     r1,v = t()
     self.assert_(r1)
     r.Delete(o.GetID(), user=user)
예제 #4
0
 def test_toolobj(self):
     user = User(u"test")
     r = self.app.root()
     o = db_app.createObj1(r)
     t = o.GetTool("nive.components.tools.example")
     r1, v = t()
     self.assert_(r1)
     r.Delete(o.GetID(), user=user)