summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/stacks/resource_types/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/dashboards/project/stacks/resource_types/tests.py')
-rw-r--r--openstack_dashboard/dashboards/project/stacks/resource_types/tests.py52
1 files changed, 0 insertions, 52 deletions
diff --git a/openstack_dashboard/dashboards/project/stacks/resource_types/tests.py b/openstack_dashboard/dashboards/project/stacks/resource_types/tests.py
deleted file mode 100644
index 4c73644..0000000
--- a/openstack_dashboard/dashboards/project/stacks/resource_types/tests.py
+++ /dev/null
@@ -1,52 +0,0 @@
1# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10# implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14from django.core.urlresolvers import reverse
15from django import http
16
17from mox3.mox import IsA
18
19from openstack_dashboard import api
20from openstack_dashboard.test import helpers as test
21
22
23class ResourceTypesTests(test.TestCase):
24
25 @test.create_stubs({api.heat: ('resource_types_list',)})
26 def test_index(self):
27 filters = {}
28 api.heat.resource_types_list(
29 IsA(http.HttpRequest), filters=filters).AndReturn(
30 self.resource_types.list())
31 self.mox.ReplayAll()
32
33 res = self.client.get(
34 reverse('horizon:project:stacks.resource_types:index'))
35 self.assertTemplateUsed(
36 res, 'horizon/common/_data_table_view.html')
37 self.assertContains(res, 'AWS::CloudFormation::Stack')
38
39 @test.create_stubs({api.heat: ('resource_type_get',)})
40 def test_detail_view(self):
41 rt = self.api_resource_types.first()
42
43 api.heat.resource_type_get(
44 IsA(http.HttpRequest), rt['resource_type']).AndReturn(rt)
45 self.mox.ReplayAll()
46
47 url = reverse('horizon:project:stacks.resource_types:details',
48 args=[rt['resource_type']])
49 res = self.client.get(url)
50
51 self.assertTemplateUsed(res, 'horizon/common/_detail.html')
52 self.assertNoMessages()