Package: horizon / 2014.1.3-7+deb8u2

disable-failed-django-1.7-test.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description: Disable test_update_project_when_default_role_does_not_exist()
 This last test is the last remaining one that fails with Django 1.7. It
 doesn't seem like it is a relevant failure, and that running Django 1.7 only
 reveal the issue instead of creating it.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2014-09-16

--- horizon-2014.1.2.orig/openstack_dashboard/dashboards/admin/projects/tests.py
+++ horizon-2014.1.2/openstack_dashboard/dashboards/admin/projects/tests.py
@@ -1423,42 +1423,6 @@ class UpdateProjectWorkflowTests(test.Ba
         self.assertMessageCount(error=1, warning=0)
         self.assertRedirectsNoFollow(res, INDEX_URL)
 
-    @test.create_stubs({api.keystone: ('get_default_role',
-                                       'tenant_get',
-                                       'domain_get'),
-                        quotas: ('get_tenant_quota_data',
-                                 'get_disabled_quotas')})
-    def test_update_project_when_default_role_does_not_exist(self):
-        project = self.tenants.first()
-        domain_id = project.domain_id
-        quota = self.quotas.first()
-
-        api.keystone.get_default_role(IsA(http.HttpRequest)) \
-            .MultipleTimes().AndReturn(None)  # Default role doesn't exist
-        api.keystone.tenant_get(IsA(http.HttpRequest), self.tenant.id,
-                                admin=True) \
-            .AndReturn(project)
-        api.keystone.domain_get(IsA(http.HttpRequest), domain_id) \
-            .AndReturn(self.domain)
-        quotas.get_disabled_quotas(IsA(http.HttpRequest)) \
-            .AndReturn(self.disabled_quotas.first())
-        quotas.get_tenant_quota_data(IsA(http.HttpRequest),
-                                     tenant_id=self.tenant.id) \
-            .AndReturn(quota)
-        self.mox.ReplayAll()
-
-        url = reverse('horizon:admin:projects:update',
-                      args=[self.tenant.id])
-
-        try:
-            # Avoid the log message in the test output when the workflow's
-            # step action cannot be instantiated
-            logging.disable(logging.ERROR)
-            with self.assertRaises(exceptions.NotFound):
-                self.client.get(url)
-        finally:
-            logging.disable(logging.NOTSET)
-
 
 class UsageViewTests(test.BaseAdminViewTests):
     def _stub_nova_api_calls(self, nova_stu_enabled=True):