← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1815287] Re: TypeError: unorderable types: MagicMock() <= int() in py35 openstack_dashboard.dashboards.project.instances.tests

 

Reviewed:  https://review.openstack.org/636013
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1ca0c6f6ec1c8efd38103a37af42d937fbb55aa4
Submitter: Zuul
Branch:    master

commit 1ca0c6f6ec1c8efd38103a37af42d937fbb55aa4
Author: Akihiro Motoki <amotoki@xxxxxxxxx>
Date:   Sat Feb 9 21:43:32 2019 +0900

    instances.tests: Set return_value for tenant_absolute_limits
    
    Previously tenant_absolute_limits was mocked but return_value
    was not set properly. As a result, MagicMock() is compared to
    an integer and this causes TypeError in python 3.
    
    Change-Id: I4c912c77f28df816811b9bb1667629548f3998c4
    Closes-Bug: #1815287


** Changed in: horizon
       Status: In Progress => 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/1815287

Title:
  TypeError: unorderable types: MagicMock() <= int() in py35
  openstack_dashboard.dashboards.project.instances.tests

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  when "tox -e py35 -- openstack_dashboard.dashboards.project.instances.tests" runs, we got the following message.
  The test itself does not fail, but it is better to be fixed.

  test_row_update (openstack_dashboard.dashboards.project.instances.tests.InstanceAjaxTests) ... Failed to retrieve quota information
  Traceback (most recent call last):
    File "/home/tipica/work/horizon/openstack_dashboard/dashboards/project/instances/tables.py", line 447, in allowed
      if instances_available <= 0 or cores_available <= 0 \
  TypeError: unorderable types: MagicMock() <= int()
  ok
  test_row_update_flavor_not_found (openstack_dashboard.dashboards.project.instances.tests.InstanceAjaxTests) ... Failed to retrieve quota information
  Traceback (most recent call last):
    File "/home/tipica/work/horizon/openstack_dashboard/dashboards/project/instances/tables.py", line 447, in allowed
      if instances_available <= 0 or cores_available <= 0 \
  TypeError: unorderable types: MagicMock() <= int()
  ok
  test_row_update_instance_error (openstack_dashboard.dashboards.project.instances.tests.InstanceAjaxTests) ... Failed to retrieve quota information
  Traceback (most recent call last):
    File "/home/tipica/work/horizon/openstack_dashboard/dashboards/project/instances/tables.py", line 447, in allowed
      if instances_available <= 0 or cores_available <= 0 \
  TypeError: unorderable types: MagicMock() <= int()
  ok

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


References