def test_flowdetail_add_task_detail(self): # Get the first flowdetail actual = b_api.flowdetail_get(self.fd_ids[0]) # Make sure it has no taskdetails self.assertEquals(len(actual), 0) # Add a taskdetail to the flowdetail b_api.flowdetail_add_task_detail(self.fd_ids[0], self.td_ids[0]) # Get the flowdetail again actual = b_api.flowdetail_get(self.fd_ids[0]) # Check that the flowdetail has one taskdetail self.assertEquals(len(actual), 1)
def test_flowdetail_remove_taskdetail(self): # Add a taskdetail to the first flowdetail b_api.flowdetail_add_task_detail(self.fd_ids[0], self.td_ids[0]) # Get the first flowdetail actual = b_api.flowdetail_get(self.fd_ids[0]) # Check that the first flowdetail has exactly one taskdetail self.assertEquals(len(actual), 1) # Remove the taskdetail from the first flowdetail b_api.flowdetail_remove_taskdetail(self.fd_ids[0], self.td_ids[0]) # Get the first flowdetail actual = b_api.flowdetail_get(self.fd_ids[0]) # Check that the first flowdetail no longer has any taskdetails self.assertEquals(len(actual), 0)