New mock release(1.1.0) broke unit/function tests

Change-Id: Ia84c667b65fb69ba877bdb0ecb45827281539e03
Closes-Bug: #1473454
This commit is contained in:
rico.lin 2015-07-10 22:28:49 +08:00
parent f860668d71
commit 953f76650e
4 changed files with 9 additions and 8 deletions

View File

@ -167,7 +167,7 @@ class ShellTest(utils.TestCase):
token_url = _shell.cs.client.auth_url + "/tokens"
self.assertEqual(non_keystone_auth_url + "/tokens", token_url)
mock_request.assert_any_called(
mock_request.assert_any_call(
"POST",
token_url,
headers=headers,

View File

@ -322,8 +322,8 @@ class AuthenticationTests(utils.TestCase):
@mock.patch.object(http_client, 'authenticate')
def test_auth_call(m):
http_client.get('/')
m.assert_called()
mock_request.assert_called()
self.assertTrue(m.called)
self.assertTrue(mock_request.called)
test_auth_call()
@ -333,6 +333,6 @@ class AuthenticationTests(utils.TestCase):
@mock.patch.object(cs.client, 'authenticate')
def test_auth_call(m):
cs.authenticate()
m.assert_called()
self.assertTrue(m.called)
test_auth_call()

View File

@ -325,8 +325,8 @@ class AuthenticationTests(utils.TestCase):
@mock.patch.object(http_client, 'authenticate')
def test_auth_call(m):
http_client.get('/')
m.assert_called()
mock_request.assert_called()
self.assertTrue(m.called)
self.assertTrue(mock_request.called)
test_auth_call()
@ -336,6 +336,6 @@ class AuthenticationTests(utils.TestCase):
@mock.patch.object(cs.client, 'authenticate')
def test_auth_call(m):
cs.authenticate()
m.assert_called()
self.assertTrue(m.called)
test_auth_call()

View File

@ -6,7 +6,8 @@ hacking<0.11,>=0.10.0
coverage>=3.6
discover
fixtures>=1.3.1
mock>=1.0
mock>=1.1;python_version!='2.6'
mock==1.0.1;python_version=='2.6'
oslosphinx>=2.5.0 # Apache-2.0
python-subunit>=0.0.18
requests-mock>=0.6.0 # Apache-2.0