def test_list_phase(self): phase_request = ZenRequest("fake_key").projects(12).phases() responses.add(responses.GET, "https://agilezen.com/api/v1/projects/12/phases/", content_type="application/json", status=200, body="{}") phase_request.send()
def test_members_url(self): request = ZenRequest("fake_key").projects(12).members(12) members_url = "https://agilezen.com/api/v1/projects/12/members/12" responses.add(responses.GET, members_url, status=200, content_type="application/json", body="{}") request.send()
def test_update_project(self): body = {"name": "name", "description": "description", "details": "details", "owner": 1} project = ZenRequest("fake_key").projects(12).update("name", "description", "details", 1) responses.add(responses.PUT, "https://agilezen.com/api/v1/projects/12", content_type="application/json", status=200, body=json.dumps(body)) project.send()
def test_phase_list_url(self): phase_data = { "id": 12, "name": "Phase", "description": "Contains stories", "index": 2 } phase_url = "https://agilezen.com/api/v1/projects/12/phases/12" request = ZenRequest("fake_key").projects(12).phases(12) responses.add(responses.GET, phase_url, status=200, content_type='application/json', body=json.dumps(phase_data)) request.send()
def test_update_project(self): body = { "name": "name", "description": "description", "details": "details", "owner": 1 } project = ZenRequest("fake_key").projects(12).update( "name", "description", "details", 1) responses.add(responses.PUT, "https://agilezen.com/api/v1/projects/12", content_type="application/json", status=200, body=json.dumps(body)) project.send()