
nose is not actively maintained now and Django default test runner seems to have enough features. * Horizon test setting no longer depends on nose and related stuffs. This commit cleans up nose related dependencies. The change was made in horizon Rocky-3, so horizon 14.0.0.0b3 is required at least. * Integraion tests is marked via django.test.tag mechanism which is introduced in Django 1.10. * Rename filename of test files to names starting with 'test_' so that the django test runner can find tests expectedly. * run_tests.sh is no longer called from tox.ini, so it can be dropped. Note that the similar run_tests.sh in horizon was dropped long ago. Change-Id: I1e5471078cc95031e8819f01100319a9ee2a3a73
36 lines
1.4 KiB
Python
36 lines
1.4 KiB
Python
# Copyright 2015, Telles Nobrega
|
|
#
|
|
# 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 a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
from sahara_dashboard import api
|
|
from sahara_dashboard.test import helpers as test
|
|
|
|
|
|
class SaharaApiTest(test.SaharaAPITestCase):
|
|
#
|
|
# Cluster
|
|
#
|
|
def test_cluster_create_count(self):
|
|
saharaclient = self.stub_saharaclient()
|
|
saharaclient.clusters.create.return_value = \
|
|
{"Clusters": ['cluster1', 'cluster2']}
|
|
ret_val = api.sahara.cluster_create(self.request,
|
|
'name',
|
|
'fake_plugin',
|
|
'1.0.0',
|
|
count=2,
|
|
is_public=False,
|
|
is_protected=False)
|
|
|
|
self.assertEqual(2, len(ret_val['Clusters']))
|