Unexpected methon call in run_test.sh

Bug #1192923 reported by Matthias Runge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
David Lyle

Bug Description

when running run_tests.sh an exception occurs, but tests still succeed.

UnexpectedMethodCallError: Unexpected method call pool_health_monitors_get.__call__(<class 'django.http.HttpRequest'>) -> None
Error while checking action permissions.
Traceback (most recent call last):
  File "/home/mrunge/work/horizon/horizon/tables/base.py", line 992, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/home/mrunge/work/horizon/horizon/tables/actions.py", line 74, in _allowed
    return self.allowed(request, datum)
  File "/home/mrunge/work/horizon/openstack_dashboard/dashboards/project/loadbalancers/tables.py", line 175, in allowed
    _('Failed to retrieve health monitors.'))
  File "/home/mrunge/work/horizon/openstack_dashboard/dashboards/project/loadbalancers/tables.py", line 169, in allowed
    monitors = api.lbaas.pool_health_monitors_get(request)
  File "/usr/lib/python2.7/site-packages/mox.py", line 763, in __call__
    return mock_method(*params, **named_params)
  File "/usr/lib/python2.7/site-packages/mox.py", line 1000, in __call__
    expected_method = self._VerifyMethodCall()
  File "/usr/lib/python2.7/site-packages/mox.py", line 1047, in _VerifyMethodCall
    expected = self._PopNextMethod()
  File "/usr/lib/python2.7/site-packages/mox.py", line 1033, in _PopNextMethod
    raise UnexpectedMethodCallError(self, None)
UnexpectedMethodCallError: Unexpected method call pool_health_monitors_get.__call__(<class 'django.http.HttpRequest'>) -> None
................................................................................

That was introduced with this change:
https://review.openstack.org/#/c/27002/12

Revision history for this message
Julie Pichon (jpichon) wrote :

Looks like a call that wasn't mocked properly in the tests.

Changed in horizon:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/33859

Changed in horizon:
assignee: nobody → David Lyle (david-lyle)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/33859
Committed: http://github.com/openstack/horizon/commit/c082826742155235a613db211b41b20a3e74a01e
Submitter: Jenkins
Branch: master

commit c082826742155235a613db211b41b20a3e74a01e
Author: David Lyle <email address hidden>
Date: Thu Jun 20 11:46:59 2013 -0600

    Fixing unmocked call errors

    Call pool_health_monitors_get was mocked, but it is called
    multiple times. Added MultipleTimes() to the mock.

    Fixes: bug #1192923

    Change-Id: I127d28d7963aa823064fe2a6593823ec6e613739

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.