コード例 #1
0
 def test_check_raises_not_found(self):
     response = Mock()
     response.status = 404
     with py.test.raises(exc.NotFound):
         client.check_result_status(response)
コード例 #2
0
 def test_check_does_not_raise_http_error(self, code):
     response = Mock()
     response.status = code
     assert client.check_result_status(response) is None
コード例 #3
0
 def test_check_raises_http_error(self, code):
     response = Mock()
     response.status = code
     with py.test.raises(exc.HttpError):
         client.check_result_status(response)
コード例 #4
0
ファイル: test_client.py プロジェクト: scibian/radosgw-agent
 def test_check_raises_not_found(self):
     response = Mock()
     response.status = 404
     with py.test.raises(exc.NotFound):
         client.check_result_status(response)
コード例 #5
0
ファイル: test_client.py プロジェクト: scibian/radosgw-agent
 def test_check_does_not_raise_http_error(self, code):
     response = Mock()
     response.status = code
     assert client.check_result_status(response) is None
コード例 #6
0
ファイル: test_client.py プロジェクト: scibian/radosgw-agent
 def test_check_raises_http_error(self, code):
     response = Mock()
     response.status = code
     with py.test.raises(exc.HttpError):
         client.check_result_status(response)