<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">While using the horizon exception handler in tabs.py, it works fine in actual execution but triggers the following error in unit test.  I wonder if someone knows what I have missed to do in setting up the test to cause this.<div><br></div><div>Thanks!</div><div>KC<br><div><br></div><div><div>======================================================================</div><div>ERROR: test_index_monitors (openstack_dashboard.dashboards.project.loadbalancer.tests.LoadBalancerTests)</div><div>----------------------------------------------------------------------</div><div>Traceback (most recent call last):</div><div>  File "/home/nova/gerrit/horizon/openstack_dashboard/test/helpers.py", line 74, in instance_stub_out</div><div>    return fn(self)</div><div>  File "/home/nova/gerrit/horizon/openstack_dashboard/dashboards/project/loadbalancer/tests.py", line 133, in test_index_monitors</div><div>    res = self.client.get(self.INDEX_URL, args=param)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/django/test/client.py", line 439, in get</div><div>    response = super(Client, self).get(path, data=data, **extra)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/django/test/client.py", line 244, in get</div><div>    return self.request(**r)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response</div><div>    response = callback(request, *callback_args, **callback_kwargs)</div><div>  File "/home/nova/gerrit/horizon/horizon/decorators.py", line 38, in dec</div><div>    return view_func(request, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/horizon/decorators.py", line 54, in dec</div><div>    return view_func(request, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/horizon/decorators.py", line 38, in dec</div><div>    return view_func(request, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/horizon/decorators.py", line 86, in dec</div><div>    return view_func(request, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view</div><div>    return self.dispatch(request, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch</div><div>    return handler(request, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/views.py", line 60, in get</div><div>    context = self.get_context_data(**kwargs)</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/views.py", line 44, in get_context_data</div><div>    exceptions.handle(self.request)</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/views.py", line 42, in get_context_data</div><div>    context["tab_group"].load_tab_data()</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/base.py", line 122, in load_tab_data</div><div>    exceptions.handle(self.request)</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/base.py", line 119, in load_tab_data</div><div>    tab._data = tab.get_context_data(self.request)</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/base.py", line 450, in get_context_data</div><div>    self.load_table_data()</div><div>  File "/home/nova/gerrit/horizon/horizon/tabs/base.py", line 434, in load_table_data</div><div>    table.data = data_func()</div><div>  File "/home/nova/gerrit/horizon/openstack_dashboard/dashboards/project/loadbalancer/tabs.py", line 40, in get_poolstable_data</div><div>    _('Unable to retrieve pools list.'))</div><div>  File "/home/nova/gerrit/horizon/openstack_dashboard/dashboards/project/loadbalancer/tabs.py", line 36, in get_poolstable_data</div><div>    pools = api.quantum.pools_get(self.tab_group.request)</div><div>  File "/home/nova/gerrit/horizon/openstack_dashboard/api/quantum.py", line 539, in pools_get</div><div>    pools = quantumclient(request).list_pools().get('pools')</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 104, in with_params</div><div>    ret = self.function(instance, *args, **kwargs)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 532, in list_pools</div><div>    return self.get(self.pools_path, params=_params)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 771, in get</div><div>    headers=headers, params=params)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 756, in retry_request</div><div>    headers=headers, params=params)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 701, in do_request</div><div>    self._handle_fault_response(status_code, replybody)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 682, in _handle_fault_response</div><div>    exception_handler_v20(status_code, des_error_body)</div><div>  File "/home/nova/gerrit/horizon/.venv/local/lib/python2.7/site-packages/python_quantumclient-2.1.40.g2bca8ee-py2.7.egg/quantumclient/v2_0/client.py", line 84, in exception_handler_v20</div><div>    message=message)</div><div>TypeError: fake_init_exception() takes exactly 3 arguments (2 given)</div><div><br></div><div><br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>--</div><div>Kuang-Ching (KC) Wang</div><div>Member of Technical Staff -- Big Switch Networks -- <a href="http://www.bigswitch.com/" target="_blank">http://www.bigswitch.com/</a></div></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></div></div></body></html>