From: Dan Mick Date: Fri, 24 Jun 2016 17:35:48 +0000 (-0700) Subject: test_find_git_parent: Compress the Mock setup a bit X-Git-Tag: 1.1.0~593^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e0062b833154f21cdd40111a878abcd07675bdd2;p=teuthology.git test_find_git_parent: Compress the Mock setup a bit Signed-off-by: Dan Mick --- diff --git a/teuthology/suite/test/test_util.py b/teuthology/suite/test/test_util.py index 7e7cf1c54..8def09e37 100644 --- a/teuthology/suite/test/test_util.py +++ b/teuthology/suite/test/test_util.py @@ -119,10 +119,8 @@ class TestUtil(object): @patch('teuthology.suite.util.requests.get') def test_find_git_parent(self, m_requests_get): - refresh_resp = Mock() - refresh_resp.ok = True - history_resp = Mock() - history_resp.ok = True + refresh_resp = Mock(ok=True) + history_resp = Mock(ok=True) history_resp.json.return_value = {'sha1s': ['sha1', 'sha1_p']} m_requests_get.side_effect = [refresh_resp, history_resp] parent_sha1 = util.find_git_parent('ceph', 'sha1')