예제 #1
0
 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()
예제 #2
0
 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()
예제 #3
0
 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()
예제 #4
0
 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()
예제 #5
0
 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()
예제 #6
0
 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()
예제 #7
0
 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()
예제 #8
0
 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()