def test_pr_comment(self): testee = BridgeProviderBitbucket({ 'username': '******', 'password': '******', 'incoming_token': 'glig', }) testee.api = MagicMock() testee.post_pr_comment('bla', 'blu', '1', 'hi') testee.api.assert_called_once_with( '1.0', 'repositories/bla/blu/pullrequests/1/comments', {'content': 'hi'}, 'post')