Esempio n. 1
0
 def test_undo_error(self):
     dbStub.setExceptions(True)
     command = multiproject.common.projects.commands.CreateTracDatabase(
         self.projectObj)
     command.success = True
     self.assertFalse(command.undo())
     self.assertTrue(dbStub.closed)
Esempio n. 2
0
    def test_project_environment_does_not_exist(self):
        dbStub.addResult([[0]])
        p = Projects()
        self.assertFalse(p.project_environment_exists("testi"))
        self.assertTrue(dbStub.closed)

        dbStub.setExceptions(True)
        self.assertFalse(p.project_environment_exists("testi"))
        self.assertTrue(dbStub.closed)
Esempio n. 3
0
    def test_project_environment_does_not_exist(self):
        dbStub.addResult([ [0] ])
        p = Projects()
        self.assertFalse(p.project_environment_exists("testi"))
        self.assertTrue(dbStub.closed)

        dbStub.setExceptions(True)
        self.assertFalse(p.project_environment_exists("testi"))
        self.assertTrue(dbStub.closed)
Esempio n. 4
0
 def test_process_request_error(self):
     dbStub.setExceptions(True)
     i = multiproject.common.users.icon.IconRenderer(self.cm)
     i.process_request(self.req)
     self.assertEquals(self.req.content, '')
     self.assertTrue(dbStub.closed)
Esempio n. 5
0
 def test_process_request_error(self):
     dbStub.setExceptions(True)
     i = multiproject.common.users.icon.IconRenderer(self.cm)
     i.process_request(self.req)
     self.assertEquals(self.req.content, '')
     self.assertTrue(dbStub.closed)
Esempio n. 6
0
 def test_get_name_for_cookie_error(self):
     dbStub.setExceptions(True)
     g = multiproject.common.users.login.GlobalLoginModule(self.cm)
     g.env = self; g.env.log = self
     self.assertEquals(g._get_name_for_cookie(self.req, self.cookie), None)
     self.assertTrue(dbStub.closed)
Esempio n. 7
0
 def test_undo_error(self):
     dbStub.setExceptions(True)
     command = multiproject.common.projects.commands.CreateTracDatabase(self.projectObj)
     command.success = True
     self.assertFalse(command.undo())
     self.assertTrue(dbStub.closed)