← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1161901] Re: Folsom unit tests failing with UnknownMethodCallError('auth_token')

 

** Changed in: horizon/folsom
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1161901

Title:
  Folsom unit tests failing with UnknownMethodCallError('auth_token')

Status in OpenStack Dashboard (Horizon):
  Invalid
Status in OpenStack Dashboard (Horizon) folsom series:
  Fix Released

Bug description:
  The Folsom unit tests don't work with the new python-keystoneclient
  0.2.3, cf. http://lists.openstack.org/pipermail/openstack-
  dev/2013-March/007038.html

  Traceback (most recent call last):
    File "/opt/stack/horizon/horizon/tests/api_tests/keystone_tests.py", line 76, in test_get_default_role
      keystoneclient = self.stub_keystoneclient()
    File "/opt/stack/horizon/horizon/test.py", line 330, in stub_keystoneclient
      self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
    File "/opt/stack/horizon/.venv/lib/python2.7/site-packages/mox.py", line 258, in CreateMock
      new_mock = MockObject(class_to_mock, attrs=attrs)
    File "/opt/stack/horizon/.venv/lib/python2.7/site-packages/mox.py", line 556, in __init__
      attr = getattr(class_to_mock, method)
    File "/opt/stack/horizon/.venv/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
      raise UnknownMethodCallError(name)
  UnknownMethodCallError: Method called is not a member of the object: Method called is not a member of the object: auth_token
  >>  raise UnknownMethodCallError('auth_token')
      
  This is due to https://github.com/openstack/python-keystoneclient/commit/01735608644a8b71d98f7798ccd6549e4db5de48 whereby auth_token started being defined using the @property decorator, which causes problem for mox (fighting for __getattr__ with the decorator).

  https://github.com/openstack/horizon/commit/1e867700415b17c29056fb55069b6a3e2b22cf1b
  fixes the problem on master.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1161901/+subscriptions


References