def test_commit_comment(self):
   testee = BridgeProviderBitbucket({
     'username': '******',
     'password': '******',
     'incoming_token': 'glig',
     })
   testee.api = MagicMock()
   testee.post_commit_comment('bla','Blu','1','hello')
   testee.api.assert_called_once_with('1.0','repositories/bla/blu/changesets/1/comments',{'content':'hello'}, 'post')
 def test_commit_comment(self):
     testee = BridgeProviderBitbucket({
         'username': '******',
         'password': '******',
         'incoming_token': 'glig',
     })
     testee.api = MagicMock()
     testee.post_commit_comment('bla', 'Blu', '1', 'hello')
     testee.api.assert_called_once_with(
         '1.0', 'repositories/bla/blu/changesets/1/comments',
         {'content': 'hello'}, 'post')
 def test_commit_test(self):
   testee = BridgeProviderBitbucket({
     'username': '******',
     'password': '******',
     'incoming_token': 'glig',
     })
   testee.set_commit_approval = MagicMock()
   testee.post_commit_comment = MagicMock()
   testee.post_commit_test('bla','blu','1','j','http://google.com',True)
   testee.post_commit_comment.assert_called_once_with('bla','blu','1','Test by j: **passed**  \nhttp://google.com')
   testee.set_commit_approval.assert_called_once_with('bla','blu','1',True)
 def test_commit_test(self):
     testee = BridgeProviderBitbucket({
         'username': '******',
         'password': '******',
         'incoming_token': 'glig',
     })
     testee.set_commit_approval = MagicMock()
     testee.post_commit_comment = MagicMock()
     testee.post_commit_test('bla', 'blu', '1', 'j', 'http://google.com',
                             True)
     testee.post_commit_comment.assert_called_once_with(
         'bla', 'blu', '1', 'Test by j: **passed**  \nhttp://google.com')
     testee.set_commit_approval.assert_called_once_with(
         'bla', 'blu', '1', True)