Esempio 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')
     wikipage = WikiPage(rm, id=1, project=1)
     wikipage.attach(fd)
     mock_new_resource.assert_called_with(
         files={'attached_file': fd},
         payload={'project': 1, 'object_id': 1}
     )
Esempio 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')
     wikipage = WikiPage(rm, id=1, project=1)
     wikipage.attach(fd)
     mock_new_resource.assert_called_with(
         files={'attached_file': fd},
         payload={'project': 1, 'object_id': 1}
     )
Esempio n. 3
0
 def test_open_file_attach(self, mock_new_resource):
     fd = open("tests/resources/tasks_list_success.json")
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     wikipage = WikiPage(rm, id=1, project=1)
     wikipage.attach(fd)
     mock_new_resource.assert_called_with(files={"attached_file": fd},
                                          payload={
                                              "project": 1,
                                              "object_id": 1
                                          })