def setUp(self): self.env = tractest.EnvironmentStub() self.db = self.env.get_db_cnx() self.burndown = burndown.BurndownComponent(self.env) self.burndown.upgrade_environment(self.db) self.mockReq = tractest.Mock(perm=tractest.MockPerm(), href=tractest.Mock(burndown=lambda : "burndown"))
def test_match_request_non_matching(self): req=tractest.Mock(path_info="/otherUrl") assert not self.burndown.match_request(req)
def test_match_request(self): req=tractest.Mock(path_info="/burndown") assert self.burndown.match_request(req)