From ad5ad1f6435b9188775c14e6b92f2bd72a03578c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 12 Jun 2013 17:57:00 +0200 Subject: [PATCH] Add basic Python 3 tests This uses `nose' to load and run tests for the time being, as testrepository tries to load everything, which is not possible currently. Until everything is Python 3 compatible, using `nose' will be simpler to list the specific files we want to run. Blueprint: make-python3-compatible Change-Id: I4c8dbf11ac8c6e0f25bc60a3e880a30bf87a60bd Signed-off-by: Julien Danjou --- tests/unit/test_eventlet_backdoor.py | 3 +-- tests/unit/test_loopingcall.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_eventlet_backdoor.py b/tests/unit/test_eventlet_backdoor.py index dfd1013..2577f6f 100644 --- a/tests/unit/test_eventlet_backdoor.py +++ b/tests/unit/test_eventlet_backdoor.py @@ -21,7 +21,6 @@ import errno import socket import eventlet -import mox from openstack.common import eventlet_backdoor from openstack.common.fixture import config @@ -56,7 +55,7 @@ class BackdoorPortTest(test.BaseTestCase): eventlet.listen(('localhost', 8800)).AndReturn(self.sock) self.sock.getsockname().AndReturn(('127.0.0.1', 8800)) eventlet.spawn_n(eventlet.backdoor.backdoor_server, self.sock, - locals=mox.IsA(dict)) + locals=moxstubout.mox.IsA(dict)) self.mox.ReplayAll() port = eventlet_backdoor.initialize_if_enabled() self.assertEqual(port, 8800) diff --git a/tests/unit/test_loopingcall.py b/tests/unit/test_loopingcall.py index dce6e6d..2895bbb 100644 --- a/tests/unit/test_loopingcall.py +++ b/tests/unit/test_loopingcall.py @@ -15,7 +15,7 @@ import datetime from eventlet import greenthread -import mox +from six.moves import mox # noqa from openstack.common import loopingcall from openstack.common import test