From 3f9fc44bc6013eb1ef32044b73426da2555fd73f Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Wed, 25 Jun 2014 12:15:04 +0400 Subject: [PATCH] Fix structure of unit tests in oslo.messaging (part 1) Even in case of libraries and when they are not big like nova. It is better to use next rules: 1) structure of tests directory is the same as a root of project Tests directory will be well organized, and it will be simple to find where to write tests 2) names for end modules should be test_.py Change-Id: Ie13d1b709e863f6a9babaaa2bf1e042ef9251671 --- tests/notify/__init__.py | 0 tests/{test_notify_dispatcher.py => notify/test_dispatcher.py} | 0 tests/{test_notify_listener.py => notify/test_listener.py} | 0 tests/{ => notify}/test_log_handler.py | 2 +- tests/{test_notifier_logger.py => notify/test_logger.py} | 2 +- tests/{ => notify}/test_notifier.py | 0 6 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/notify/__init__.py rename tests/{test_notify_dispatcher.py => notify/test_dispatcher.py} (100%) rename tests/{test_notify_listener.py => notify/test_listener.py} (100%) rename tests/{ => notify}/test_log_handler.py (98%) rename tests/{test_notifier_logger.py => notify/test_logger.py} (99%) rename tests/{ => notify}/test_notifier.py (100%) diff --git a/tests/notify/__init__.py b/tests/notify/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/test_notify_dispatcher.py b/tests/notify/test_dispatcher.py similarity index 100% rename from tests/test_notify_dispatcher.py rename to tests/notify/test_dispatcher.py diff --git a/tests/test_notify_listener.py b/tests/notify/test_listener.py similarity index 100% rename from tests/test_notify_listener.py rename to tests/notify/test_listener.py diff --git a/tests/test_log_handler.py b/tests/notify/test_log_handler.py similarity index 98% rename from tests/test_log_handler.py rename to tests/notify/test_log_handler.py index ef1e089ea..8e5d55f18 100644 --- a/tests/test_log_handler.py +++ b/tests/notify/test_log_handler.py @@ -15,7 +15,7 @@ import mock from oslo import messaging from oslo.messaging.notify import log_handler -from tests import test_notifier +from tests.notify import test_notifier from tests import utils as test_utils diff --git a/tests/test_notifier_logger.py b/tests/notify/test_logger.py similarity index 99% rename from tests/test_notifier_logger.py rename to tests/notify/test_logger.py index ac4a77058..cb4fb2a72 100644 --- a/tests/test_notifier_logger.py +++ b/tests/notify/test_logger.py @@ -28,7 +28,7 @@ import testtools from oslo import messaging from oslo.messaging.openstack.common import timeutils -from tests import test_notifier +from tests.notify import test_notifier from tests import utils as test_utils diff --git a/tests/test_notifier.py b/tests/notify/test_notifier.py similarity index 100% rename from tests/test_notifier.py rename to tests/notify/test_notifier.py