Stop raising keystoneauth1 exceptions in odl unit tests
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 26 Feb 2018 10:31:48 +0000 (11:31 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 26 Feb 2018 10:33:43 +0000 (11:33 +0100)
It simply raises Exceptions to avoid depending on keystoneauth1.
Snaps may also reraise another exception.

Change-Id: Ib3041b2d8ff51ee098f2bf0b9918079b7945abf3
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/tests/unit/odl/test_odl.py
requirements.txt

index c11948b..aa31703 100644 (file)
@@ -13,7 +13,6 @@ import logging
 import os
 import unittest
 
-from keystoneauth1.exceptions import auth_plugins
 import mock
 from robot.errors import RobotError
 import six
@@ -331,7 +330,7 @@ class ODLRunTesting(ODLTesting):
 
     def test_exc(self):
         with mock.patch('snaps.openstack.utils.keystone_utils.get_endpoint',
-                        side_effect=auth_plugins.MissingAuthPlugin()):
+                        side_effect=Exception()):
             self.assertEqual(self.test.run(),
                              testcase.TestCase.EX_RUN_ERROR)
 
index a8b5273..86d4b9a 100644 (file)
@@ -4,7 +4,6 @@
 pbr!=2.1.0,>=2.0.0 # Apache-2.0
 PyYAML>=3.10.0 # MIT
 GitPython>=1.0.1 # BSD License (3 clause)
-keystoneauth1>=3.1.0 # Apache-2.0
 requests>=2.14.2 # Apache-2.0
 robotframework>=3.0
 scp