Exemplo n.º 1
0
 def test_open_file_attach(self, mock_new_resource):
     fd = open('tests/resources/tasks_list_success.json')
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     epic = Epic(rm, id=1, project=1)
     epic.attach(fd)
     mock_new_resource.assert_called_with(files={'attached_file': fd},
                                          payload={
                                              'project': 1,
                                              'object_id': 1
                                          })
Exemplo n.º 2
0
 def test_open_file_attach(self, mock_new_resource):
     fd = open("tests/resources/tasks_list_success.json")
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     epic = Epic(rm, id=1, project=1)
     epic.attach(fd)
     mock_new_resource.assert_called_with(files={"attached_file": fd},
                                          payload={
                                              "project": 1,
                                              "object_id": 1
                                          })