Ejemplo n.º 1
0
 def test_AT_projectID(self):
     """ test AT setProject(), getProject(), id() """
     at = AT({'alias': 'q'})
     self.project.addtask(at)
     # get the taskid before adding project id
     tid = at._taskid
     # now set the project id
     at.setProject(2)
     self.assertEqual(at.getProject(), 2)
     # now strip out the project id from _taskid
     self.assertEqual(at.id(True), tid)
Ejemplo n.º 2
0
 def test_AT_projectID(self):
     """ test AT setProject(), getProject(), id() """
     at = AT({'alias': 'q'})
     self.project.addtask(at)
     # get the taskid before adding project id
     tid = at._taskid
     # now set the project id
     at.setProject(2)
     self.assertEqual(at.getProject(), 2)
     # now strip out the project id from _taskid
     self.assertEqual(at.id(True), tid)
Ejemplo n.º 3
0
    def test_projectID(self):
        at = AT({'alias': 'q'})
        self.project.addtask(at)

        # get the taskid before adding project id
        tid = at._taskid
        if (self.verbose):
            print "\nAT Class taskid (before):", at._taskid

        # now set the project id
        pid = 2
        at.setProject(pid)
        pid = at.getProject()
        if (self.verbose):
            print "\nAT Class project", pid

        self.assertEqual(pid, 2)

        # now strip out the project id from _taskid
        taskid = at.id(True)
        if (self.verbose):
            print "\nAT Class taskid (after):", taskid

        self.assertEqual(taskid, tid)
Ejemplo n.º 4
0
    def test_projectID(self):
        at = AT({'alias': 'q'})
        self.project.addtask(at)

        # get the taskid before adding project id
        tid = at._taskid
        if(self.verbose):
            print "\nAT Class taskid (before):", at._taskid
 
        # now set the project id
        pid = 2
        at.setProject(pid)
        pid = at.getProject()
        if(self.verbose):
            print "\nAT Class project", pid
 
        self.assertEqual(pid, 2)
 
        # now strip out the project id from _taskid
        taskid = at.id(True)
        if(self.verbose):
            print "\nAT Class taskid (after):", taskid
 
        self.assertEqual(taskid, tid)