From 03e516fa6b82bf1e8ab825cd729d5591d3cecec9 Mon Sep 17 00:00:00 2001 From: Russell Sim Date: Wed, 9 Oct 2013 12:54:41 +1100 Subject: [PATCH] Ignore irrelevant secgroup form field errors When cleaning data from in the security group rule form, remove any associated error messages that are not related to the actual fields being saved. If we are setting a value derived from another field, also delete the error message associated with that field. Change-Id: I1eb4835ea2368b62374f230c6293062a2340980d Closes-Bug:1237128 --- openstack_dashboard/test/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/test/helpers.py b/openstack_dashboard/test/helpers.py index 165b394e..c008002e 100644 --- a/openstack_dashboard/test/helpers.py +++ b/openstack_dashboard/test/helpers.py @@ -69,7 +69,7 @@ def create_stubs(stubs_to_create={}): def inner_stub_out(fn): @wraps(fn) - def instance_stub_out(self): + def instance_stub_out(self, *args, **kwargs): for key in stubs_to_create: if not (isinstance(stubs_to_create[key], tuple) or isinstance(stubs_to_create[key], list)): @@ -80,7 +80,7 @@ def create_stubs(stubs_to_create={}): for value in stubs_to_create[key]: self.mox.StubOutWithMock(key, value) - return fn(self) + return fn(self, *args, **kwargs) return instance_stub_out return inner_stub_out