Esempio n. 1
0
 def test_get_auth_plugin_v3_Token(self, mock_v2, mock_v3):
     mock_opts = Mock()
     mock_opts.os_identity_api_version = '3'
     mock_opts.os_username = ''
     mock_opts.os_token = 'mytoken'
     client.get_auth_plugin(mock_opts)
     self.assertTrue(mock_v3.Token.called)
Esempio n. 2
0
 def test_get_auth_plugin_v2_Token(self, mock_v2, mock_v3):
     mock_opts = Mock()
     mock_opts.os_identity_api_version = '2.0'
     mock_opts.os_username = ''
     mock_opts.os_token = 'mytoken'
     client.get_auth_plugin(mock_opts)
     self.assertTrue(mock_v2.Token.called)
Esempio n. 3
0
 def test_get_auth_plugin_v3_Password(self, mock_v2, mock_v3):
     mock_opts = Mock()
     mock_opts.os_identity_api_version = '3'
     mock_opts.os_user_name = 'myuser'
     mock_opts.os_token = ''
     client.get_auth_plugin(mock_opts)
     self.assertTrue(mock_v3.Password.called)
Esempio n. 4
0
 def test_get_auth_plugin_v2_Password(self, mock_v2, mock_v3):
     mock_opts = Mock()
     mock_opts.os_identity_api_version = '2.0'
     mock_opts.os_user_name = 'myuser'
     mock_opts.os_token = ''
     client.get_auth_plugin(mock_opts)
     self.assertTrue(mock_v2.Password.called)