Test module refactoring

Tests moved inside climate module

Change-Id: I619960bd9dc6293980171b510873ef32a5df3ad6
This commit is contained in:
Nikita Konovalov 2013-11-19 09:33:02 +04:00
parent 74a3dbdad3
commit a9e564b13f
11 changed files with 14 additions and 19 deletions

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import tempfile
import fixtures

View File

@ -18,7 +18,7 @@ import datetime
from climate.db.sqlalchemy import api as db_api
from climate.openstack.common import context
from climate.openstack.common import uuidutils
from climate import test
from climate import tests
def _get_fake_random_uuid():
@ -92,7 +92,7 @@ def _create_physical_lease(values=_get_fake_phys_lease_values(),
return db_api.lease_create(values)
class SQLAlchemyDBApiTestCase(test.DBTestCase):
class SQLAlchemyDBApiTestCase(tests.DBTestCase):
"""Test case for SQLAlchemy DB API."""
def setUp(self):

View File

@ -14,10 +14,10 @@
# limitations under the License.
from climate.db import api as db_api
from climate import test
from climate import tests
class DBApiTestCase(test.TestCase):
class DBApiTestCase(tests.TestCase):
"""Test case for DB API."""
# TODO(sbauza) : Extend methods to CRUD lease

View File

@ -1,7 +1,4 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2013 Julien Danjou <julien@danjou.info>
# Copyright (c) 2013 Julien Danjou <julien@danjou.info>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@ -18,10 +15,10 @@
import mock
from climate.inventory import nova
from climate import test
from climate import tests
class ServiceTestCase(test.TestCase):
class ServiceTestCase(tests.TestCase):
"""This test class should be removed, but is kept as an example for unit
testing.
"""

View File

@ -1,7 +1,4 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2013 Julien Danjou <julien@danjou.info>
# Copyright (c) 2013 Julien Danjou <julien@danjou.info>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@ -15,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from climate import test
from climate import tests
from climate.utils import service
class ServiceTestCase(test.TestCase):
class ServiceTestCase(tests.TestCase):
def test_prepare_service(self):
service.prepare_service()

View File

@ -18,10 +18,10 @@
from nova.tests.scheduler import fakes
from climate.nova import climate_filter
from climate import test
from climate import tests
class ClimateSchedulerTestCase(test.TestCase):
class ClimateSchedulerTestCase(tests.TestCase):
def test_climate_scheduler(self):
f = climate_filter.ClimateFilter()

View File

@ -11,7 +11,7 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
commands = nosetests --no-path-adjustment --where=tests_nova_scheduler
nosetests --no-path-adjustment --where=tests {posargs}
nosetests --no-path-adjustment --where=climate/tests {posargs}
sitepackages = False
[testenv:cover]