def test_edit_issue_custom_attribute(self, mock_requestmaker_patch, mock_requestmaker_get): mock_requestmaker_get.return_value = MockResponse(200, create_mock_json('tests/resources/issue_customattr_success.json')) mock_requestmaker_patch.return_value = MockResponse(200, create_mock_json('tests/resources/issue_customattr_success.json')) rm = RequestMaker('/api/v1', 'fakehost', 'faketoken') issue = Issue(rm, id=1, project=1) new_attribute = issue.set_attribute(1, 13) self.assertTrue('attributes_values' in new_attribute) mock_requestmaker_patch.assert_called_with( '/{endpoint}/custom-attributes-values/{id}', endpoint=Issue.endpoint, id=issue.id, payload={ 'attributes_values': {u'1': 13}, 'version': 1 } )
def test_edit_issue_custom_attribute(self, mock_requestmaker_patch, mock_requestmaker_get): mock_requestmaker_get.return_value = MockResponse( 200, create_mock_json("tests/resources/issue_customattr_success.json") ) mock_requestmaker_patch.return_value = MockResponse( 200, create_mock_json("tests/resources/issue_customattr_success.json") ) rm = RequestMaker("/api/v1", "fakehost", "faketoken") issue = Issue(rm, id=1, project=1) new_attribute = issue.set_attribute(1, 13) self.assertTrue("attributes_values" in new_attribute) mock_requestmaker_patch.assert_called_with( "/{endpoint}/custom-attributes-values/{id}", endpoint=Issue.endpoint, id=issue.id, payload={"attributes_values": {"1": 13}, "version": 1}, )