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
This commit is contained in:
Eric Harney 2015-08-18 18:10:58 -04:00
parent 6da01c1b41
commit 7049f5bf10
1 changed files with 1 additions and 1 deletions

View File

@ -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')