Move tests to ceilometerclient.
tests.* implies an incorrect global package name. Additionally, consuming code can benefit from being able to choose to consume test code and fixtures. Change-Id: I7ba2b3ba1c2a99410b54fc40b48dfe2fc53eb79a
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./ $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tests import utils
|
||||
from ceilometerclient.tests import utils
|
||||
|
||||
from ceilometerclient.common import http
|
||||
|
||||
@@ -10,8 +10,8 @@ from keystoneclient.v2_0 import client as ksclient
|
||||
|
||||
from ceilometerclient import exc
|
||||
from ceilometerclient import shell as ceilometer_shell
|
||||
from ceilometerclient.tests import utils
|
||||
from ceilometerclient.v1 import client as v1client
|
||||
from tests import utils
|
||||
|
||||
FAKE_ENV = {'OS_USERNAME': 'username',
|
||||
'OS_PASSWORD': 'password',
|
||||
@@ -18,7 +18,7 @@ import cStringIO
|
||||
import sys
|
||||
|
||||
from ceilometerclient.common import utils
|
||||
from tests import utils as test_utils
|
||||
from ceilometerclient.tests import utils as test_utils
|
||||
|
||||
|
||||
class UtilsTest(test_utils.BaseTestCase):
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v1.meters
|
||||
from tests import utils
|
||||
|
||||
|
||||
fixtures = {
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v1.meters
|
||||
from tests import utils
|
||||
|
||||
|
||||
fixtures = {
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v1.meters
|
||||
from tests import utils
|
||||
|
||||
|
||||
fixtures = {
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v1.meters
|
||||
from tests import utils
|
||||
|
||||
|
||||
fixtures = {
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v1.meters
|
||||
from tests import utils
|
||||
|
||||
|
||||
fixtures = {
|
||||
@@ -17,10 +17,10 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
import unittest
|
||||
import testtools
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v2.alarms
|
||||
from tests import utils
|
||||
|
||||
|
||||
AN_ALARM = {u'alarm_actions': [u'http://site:8000/alarm'],
|
||||
@@ -94,9 +94,10 @@ fixtures = {
|
||||
}
|
||||
|
||||
|
||||
class AlarmManagerTest(unittest.TestCase):
|
||||
class AlarmManagerTest(testtools.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(AlarmManagerTest, self).setUp()
|
||||
self.api = utils.FakeAPI(fixtures)
|
||||
self.mgr = ceilometerclient.v2.alarms.AlarmManager(self.api)
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
from ceilometerclient.v2 import options
|
||||
from tests import utils
|
||||
|
||||
|
||||
class BuildUrlTest(utils.BaseTestCase):
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v2.resources
|
||||
from tests import utils
|
||||
|
||||
|
||||
fixtures = {
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v2.samples
|
||||
from tests import utils
|
||||
|
||||
|
||||
base_url = '/v2/meters/instance'
|
||||
@@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.tests import utils
|
||||
import ceilometerclient.v2.statistics
|
||||
from tests import utils
|
||||
|
||||
base_url = '/v2/meters/instance/statistics'
|
||||
qry = 'q.op=&q.op=&q.value=foo&q.value=bar&q.field=resource_id&q.field=source'
|
||||
Reference in New Issue
Block a user