]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
test_find_git_parent: Compress the Mock setup a bit
authorDan Mick <dan.mick@redhat.com>
Fri, 24 Jun 2016 17:35:48 +0000 (10:35 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 24 Jun 2016 17:35:48 +0000 (10:35 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/suite/test/test_util.py

index 7e7cf1c545be99bd64dc7a7eeb00d3cd5eafb1fa..8def09e375354776064b8801e8de89f5453fa1e5 100644 (file)
@@ -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')