def test_downvote(self, mock_requestmaker_post): rm = RequestMaker('/api/v1', 'fakehost', 'faketoken') issue = Issue(rm, id=1) self.assertEqual(issue.downvote().id, 1) mock_requestmaker_post.assert_called_with('/{endpoint}/{id}/downvote', endpoint='issues', id=1)
def test_downvote(self, mock_requestmaker_post): rm = RequestMaker('/api/v1', 'fakehost', 'faketoken') issue = Issue(rm, id=1) self.assertEqual(issue.downvote().id, 1) mock_requestmaker_post.assert_called_with( '/{endpoint}/{id}/downvote', endpoint='issues', id=1 )
def test_downvote(self, mock_requestmaker_post): rm = RequestMaker("/api/v1", "fakehost", "faketoken") issue = Issue(rm, id=1) self.assertEqual(issue.downvote().id, 1) mock_requestmaker_post.assert_called_with("/{endpoint}/{id}/downvote", endpoint="issues", id=1)