Make the Zone object py3 compatible

This fixes the tests for the pool manager by making the Zone class
hashable, so that it can be used in sets.

Change-Id: Ief72a0787aa91f3e4e2b599bd0d573ac0eb9e881
This commit is contained in:
Thomas Herve 2017-05-30 22:11:24 +02:00
parent 92598a62f1
commit 6bffad2e5e
2 changed files with 3 additions and 1 deletions

View File

@ -188,6 +188,9 @@ class Zone(base.DictObjectMixin, base.SoftDeleteObjectMixin,
"Provided object does not match "
"schema", errors=errors, object=self)
def __hash__(self):
return hash(self.id)
def validate(self):
errors = ValidationErrorList()

View File

@ -1,5 +1,4 @@
# Blacklist of tests failing on Python 3
designate.tests.test_pool_manager.test_service
designate.tests.unit.test_central.test_basic
designate.tests.unit.test_pool
designate.tests.unit.test_producer.test_tasks