Replace using tests.utils with openstack.common.test

It is the first step to replace using tests.utils with openstack.common.test.
All these tests don't use mock objects, stubs, config files and use only
BaseTestCase class.

Change-Id: I511816b5c9e6c5c34ebff199296ee4fc8b84c672
bp: common-unit-tests
This commit is contained in:
Alexander Gorodnev 2013-08-09 05:34:55 -04:00
parent 2af59ea388
commit ca9dcaf055
4 changed files with 9 additions and 9 deletions

View File

@ -19,10 +19,10 @@ import datetime
import sys
from openstack.common import importutils
from tests import utils
from openstack.common import test
class ImportUtilsTest(utils.BaseTestCase):
class ImportUtilsTest(test.BaseTestCase):
# NOTE(jkoelker) There has GOT to be a way to test this. But mocking
# __import__ is the devil. Right now we just make

View File

@ -16,10 +16,10 @@
# under the License.
from openstack.common import network_utils
from tests import utils
from openstack.common import test
class NetworkUtilsTest(utils.BaseTestCase):
class NetworkUtilsTest(test.BaseTestCase):
def test_parse_host_port(self):
self.assertEqual(('server01', 80),

View File

@ -20,10 +20,10 @@ import mock
import six
from openstack.common import strutils
from tests import utils
from openstack.common import test
class StrUtilsTest(utils.BaseTestCase):
class StrUtilsTest(test.BaseTestCase):
def test_bool_bool_from_string(self):
self.assertTrue(strutils.bool_from_string(True))

View File

@ -21,11 +21,11 @@ import datetime
import iso8601
import mock
from openstack.common import test
from openstack.common import timeutils
from tests import utils
class TimeUtilsTest(utils.BaseTestCase):
class TimeUtilsTest(test.BaseTestCase):
def setUp(self):
super(TimeUtilsTest, self).setUp()
@ -181,7 +181,7 @@ class TimeUtilsTest(utils.BaseTestCase):
self.assertTrue(timeutils.is_soon(expires, 0))
class TestIso8601Time(utils.BaseTestCase):
class TestIso8601Time(test.BaseTestCase):
def _instaneous(self, timestamp, yr, mon, day, hr, min, sec, micro):
self.assertEquals(timestamp.year, yr)