From 70dc6ecb25bcb750e43677a1484bebbfb5e112f6 Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Thu, 12 May 2016 13:39:49 +0100 Subject: [PATCH] expected_success should be a classmethod expected_success overrides a classmethod from the base rest_client.RestClient class, so we should have the same method type here. Change-Id: I45421960a65103474b142095926a6a5834729489 --- designate_tempest_plugin/services/dns/json/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designate_tempest_plugin/services/dns/json/base.py b/designate_tempest_plugin/services/dns/json/base.py index ef07ec17..ef7260b0 100644 --- a/designate_tempest_plugin/services/dns/json/base.py +++ b/designate_tempest_plugin/services/dns/json/base.py @@ -60,7 +60,8 @@ class DnsClientBase(rest_client.RestClient): else: raise lib_exc.InvalidContentType() - def expected_success(self, expected_code, read_code): + @classmethod + def expected_success(cls, expected_code, read_code): # the base class method does not check correctly if read_code is not # an int. warn about this and cast to int to avoid silent errors. if not isinstance(read_code, int): @@ -69,7 +70,7 @@ class DnsClientBase(rest_client.RestClient): {'expected_code': expected_code, 'read_code': read_code}) LOG.warn(message) - return super(DnsClientBase, self).expected_success( + return super(DnsClientBase, cls).expected_success( expected_code=expected_code, read_code=int(read_code), )