Unit tests failing with raise UnknownMethodCallError('management_url')

Bug #1268631 reported by Julie Pichon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
David Lyle
Grizzly
Fix Released
High
Julie Pichon
Havana
Fix Released
High
David Lyle

Bug Description

A number of unit tests are failing for every review, likely related to the release of keystoneclient 0.4.2:

<fungi> i think python-keystoneclient==0.4.2 may have just broken horizon
<fungi> looks like all python unit test runs for horizon are now failing on keystone-specific tests as of the last few minutes, and the only change in the pip freeze output for the tests is python-keystoneclient==0.4.2 instead of 0.4.1
<bknudson> fungi: "UnknownMethodCallError: Method called is not a member of the object: management_url" ?
<fungi> horizon will presumably need patching to work around that
<bknudson> Looks like the horizon test is trying to create a mock keystoneclient and creating the mock fails for some reason.

2014-01-13 14:42:38.747 | ======================================================================
2014-01-13 14:42:38.747 | FAIL: test_get_default_role (openstack_dashboard.test.api_tests.keystone_tests.RoleAPITests)
2014-01-13 14:42:38.748 | ----------------------------------------------------------------------
2014-01-13 14:42:38.748 | Traceback (most recent call last):
2014-01-13 14:42:38.748 | File "/home/jenkins/workspace/gate-horizon-python27/openstack_dashboard/test/api_tests/keystone_tests.py", line 77, in test_get_default_role
2014-01-13 14:42:38.748 | keystoneclient = self.stub_keystoneclient()
2014-01-13 14:42:38.748 | File "/home/jenkins/workspace/gate-horizon-python27/openstack_dashboard/test/helpers.py", line 306, in stub_keystoneclient
2014-01-13 14:42:38.748 | self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
2014-01-13 14:42:38.748 | File "/home/jenkins/workspace/gate-horizon-python27/.tox/py27/local/lib/python2.7/site-packages/mox.py", line 258, in CreateMock
2014-01-13 14:42:38.748 | new_mock = MockObject(class_to_mock, attrs=attrs)
2014-01-13 14:42:38.748 | File "/home/jenkins/workspace/gate-horizon-python27/.tox/py27/local/lib/python2.7/site-packages/mox.py", line 556, in __init__
2014-01-13 14:42:38.749 | attr = getattr(class_to_mock, method)
2014-01-13 14:42:38.749 | File "/home/jenkins/workspace/gate-horizon-python27/.tox/py27/local/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
2014-01-13 14:42:38.749 | raise UnknownMethodCallError(name)
2014-01-13 14:42:38.749 | UnknownMethodCallError: Method called is not a member of the object: management_url
2014-01-13 14:42:38.749 | >> raise UnknownMethodCallError('management_url')
2014-01-13 14:42:38.749 |
2014-01-13 14:42:38.749 |
2014-01-13 14:42:38.749 | ======================================================================
2014-01-13 14:42:38.749 | FAIL: Tests api.keystone.remove_tenant_user
2014-01-13 14:42:38.749 | ----------------------------------------------------------------------
2014-01-13 14:42:38.750 | Traceback (most recent call last):
2014-01-13 14:42:38.750 | File "/home/jenkins/workspace/gate-horizon-python27/openstack_dashboard/test/api_tests/keystone_tests.py", line 61, in test_remove_tenant_user
2014-01-13 14:42:38.750 | keystoneclient = self.stub_keystoneclient()
2014-01-13 14:42:38.750 | File "/home/jenkins/workspace/gate-horizon-python27/openstack_dashboard/test/helpers.py", line 306, in stub_keystoneclient
2014-01-13 14:42:38.750 | self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
2014-01-13 14:42:38.750 | File "/home/jenkins/workspace/gate-horizon-python27/.tox/py27/local/lib/python2.7/site-packages/mox.py", line 258, in CreateMock
2014-01-13 14:42:38.750 | new_mock = MockObject(class_to_mock, attrs=attrs)
2014-01-13 14:42:38.750 | File "/home/jenkins/workspace/gate-horizon-python27/.tox/py27/local/lib/python2.7/site-packages/mox.py", line 556, in __init__
2014-01-13 14:42:38.750 | attr = getattr(class_to_mock, method)
2014-01-13 14:42:38.750 | File "/home/jenkins/workspace/gate-horizon-python27/.tox/py27/local/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
2014-01-13 14:42:38.750 | raise UnknownMethodCallError(name)
2014-01-13 14:42:38.751 | UnknownMethodCallError: Method called is not a member of the object: management_url
2014-01-13 14:42:38.751 | >> raise UnknownMethodCallError('management_url')

Examples:
https://jenkins04.openstack.org/job/gate-horizon-python27/18/console
http://logs.openstack.org/35/59935/3/check/gate-horizon-python27/e995c33/console.html

Julie Pichon (jpichon)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → icehouse-2
David Lyle (david-lyle)
Changed in horizon:
assignee: nobody → David Lyle (david-lyle)
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/66361

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

Reviewed: https://review.openstack.org/66361
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f7d00b5960c4e7f878a647e6c83ead986d55f921
Submitter: Jenkins
Branch: master

commit f7d00b5960c4e7f878a647e6c83ead986d55f921
Author: David Lyle <email address hidden>
Date: Mon Jan 13 08:54:01 2014 -0700

    Adding management_url to test mock client

    Mocking management_url property in keystoneclient.Client for mox.

    Change-Id: I53dbb9357808584007b2871d4804150e2c547436
    Closes-Bug: #1268631

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/66421

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/66422

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/66424

Revision history for this message
David Lyle (david-lyle) wrote :

only the review in #5 is correct for havana, process error on the first two.

Revision history for this message
Jamie Lennox (jamielennox) wrote :

I'm not sure what about the mocking framework makes this not work but from 0.4.1 -> 0.4.2 management_url changed from an attribute to a property.

The actual behaviour of management_url should not have changed.

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/68600

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/grizzly)

Reviewed: https://review.openstack.org/68600
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=117ac2f22c06c98820683535c4a1eedfe528cba3
Submitter: Jenkins
Branch: stable/grizzly

commit 117ac2f22c06c98820683535c4a1eedfe528cba3
Author: David Lyle <email address hidden>
Date: Mon Jan 13 08:54:01 2014 -0700

    Adding management_url to test mock client

    Mocking management_url property in keystoneclient.Client for mox.

    Change-Id: I53dbb9357808584007b2871d4804150e2c547436
    Closes-Bug: #1268631
    (cherry picked from commit f7d00b5960c4e7f878a647e6c83ead986d55f921)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/havana)

Reviewed: https://review.openstack.org/66424
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2e114824fc7b5ae4987344f1ea993dfd14aac4f8
Submitter: Jenkins
Branch: stable/havana

commit 2e114824fc7b5ae4987344f1ea993dfd14aac4f8
Author: David Lyle <email address hidden>
Date: Mon Jan 13 08:54:01 2014 -0700

    Adding management_url to test mock client

    Mocking management_url property in keystoneclient.Client for mox.

    Closes-Bug: #1268631
    (cherry picked from commit f7d00b5960c4e7f878a647e6c83ead986d55f921)

    Change-Id: I3e1067aa4bc6cd5d2875433197d7bea69a16195b

Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
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.