From 4e738a6791eb5678f670e26b6e38c54776f0fd9d Mon Sep 17 00:00:00 2001 From: Paul Glass Date: Fri, 29 Jan 2016 14:28:47 -0600 Subject: [PATCH] Update functional test TLDCLient This client now supports the `v2_path_pattern` config option, and now allows you to pass in filters when listing tlds. Change-Id: If6e1a343c1a0252f9f9d19f50c5d4c9772fa638c --- functionaltests/api/v2/clients/tld_client.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/functionaltests/api/v2/clients/tld_client.py b/functionaltests/api/v2/clients/tld_client.py index 3c614ede8..ad625f368 100644 --- a/functionaltests/api/v2/clients/tld_client.py +++ b/functionaltests/api/v2/clients/tld_client.py @@ -21,16 +21,14 @@ from functionaltests.common.client import ClientMixin class TLDClient(ClientMixin): - @classmethod - def tlds_uri(cls): - return "/v2/tlds" + def tlds_uri(self, filters=None): + return self.create_uri("/tlds", filters=filters) - @classmethod - def tld_uri(cls, tld_id): - return "{0}/{1}".format(cls.tlds_uri(), tld_id) + def tld_uri(self, tld_id): + return "{0}/{1}".format(self.tlds_uri(), tld_id) - def list_tlds(self, **kwargs): - resp, body = self.client.get(self.tlds_uri(), **kwargs) + def list_tlds(self, filters=None, **kwargs): + resp, body = self.client.get(self.tlds_uri(filters), **kwargs) return self.deserialize(resp, body, TLDListModel) def get_tld(self, tld_id, **kwargs):