Ejemplo n.º 1
0
 def test_get_branch_info(self, m_get):
     mock_resp = Mock()
     mock_resp.ok = True
     mock_resp.json.return_value = "some json"
     m_get.return_value = mock_resp
     result = util.get_branch_info("teuthology", "master")
     m_get.assert_called_with(
         "https://api.github.com/repos/ceph/teuthology/git/refs/heads/master"
     )
     assert result == "some json"
Ejemplo n.º 2
0
 def test_get_branch_info(self, m_get):
     mock_resp = Mock()
     mock_resp.ok = True
     mock_resp.json.return_value = "some json"
     m_get.return_value = mock_resp
     result = util.get_branch_info("teuthology", "master")
     m_get.assert_called_with(
         "https://api.github.com/repos/ceph/teuthology/git/refs/heads/master"
     )
     assert result == "some json"