]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Tests: Fix az test failure when PYTHONHASHSEED != 0
authorEric Harney <eharney@redhat.com>
Thu, 19 Mar 2015 16:27:59 +0000 (12:27 -0400)
committerEric Harney <eharney@redhat.com>
Thu, 19 Mar 2015 16:33:27 +0000 (12:33 -0400)
commit2c50eadb822953c0d945dfd6e922dcdede7ab2ce
treed0b8da5c6db69594d2fd605322ecfd664cc509a2
parent8d814b0651cde0bcdd2f5d2b58aee07508a3283e
Tests: Fix az test failure when PYTHONHASHSEED != 0

The test_list_availability_zones_enabled_service test calls
a method which returns a tuple that is generated from a dict.
This is compared to a tuple in the test, which can fail when
PYTHONHASHSEED is not 0, due to the tuples containing elements
in different orders.  (Because the dict used to build the tuple
was ordered differently.)

For this test, we can convert to lists and sort them to do the
comparison, since the ordering is not important.

Partial-Bug: #1348818

Change-Id: Ib7e5d59073e5e243450e28492d68942f6088bb5f
cinder/tests/test_volume.py
cinder/volume/api.py