From 7049f5bf10320608489b6e1bdad1a96c85482d3a Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Tue, 18 Aug 2015 18:10:58 -0400 Subject: [PATCH] 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 --- cinder/tests/unit/test_zfssa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.45.2