From: Eric Harney Date: Tue, 18 Aug 2015 22:10:58 +0000 (-0400) Subject: Tests: Fix zfssa TestRestClientURL.test_request X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7049f5bf10320608489b6e1bdad1a96c85482d3a;p=openstack-build%2Fcinder-build.git Tests: Fix zfssa TestRestClientURL.test_request This test can currently fail with mismatched parameters to urlopen. Just ensure that urlopen is called so that this works across all environments/versions. Closes-Bug: #1486245 Change-Id: Icec5d208a979ba62b9dfef2b499a00bacec841d3 --- diff --git a/cinder/tests/unit/test_zfssa.py b/cinder/tests/unit/test_zfssa.py index f98092994..14a38f9d1 100644 --- a/cinder/tests/unit/test_zfssa.py +++ b/cinder/tests/unit/test_zfssa.py @@ -657,7 +657,7 @@ class TestRestClientURL(test.TestCase): _urlopen.return_value = mock.Mock() self.client.request(path, mock.ANY) _Request.assert_called_with(self.url + path, None, self.client.headers) - _urlopen.assert_called_with(mock.ANY, timeout=self.timeout) + self.assertEqual(1, _urlopen.call_count) _RestResult.assert_called_with(response=mock.ANY) @mock.patch.object(client, 'RestResult')