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
This commit is contained in:
parent
caa9cc6abf
commit
4e738a6791
@ -21,16 +21,14 @@ from functionaltests.common.client import ClientMixin
|
|||||||
|
|
||||||
class TLDClient(ClientMixin):
|
class TLDClient(ClientMixin):
|
||||||
|
|
||||||
@classmethod
|
def tlds_uri(self, filters=None):
|
||||||
def tlds_uri(cls):
|
return self.create_uri("/tlds", filters=filters)
|
||||||
return "/v2/tlds"
|
|
||||||
|
|
||||||
@classmethod
|
def tld_uri(self, tld_id):
|
||||||
def tld_uri(cls, tld_id):
|
return "{0}/{1}".format(self.tlds_uri(), tld_id)
|
||||||
return "{0}/{1}".format(cls.tlds_uri(), tld_id)
|
|
||||||
|
|
||||||
def list_tlds(self, **kwargs):
|
def list_tlds(self, filters=None, **kwargs):
|
||||||
resp, body = self.client.get(self.tlds_uri(), **kwargs)
|
resp, body = self.client.get(self.tlds_uri(filters), **kwargs)
|
||||||
return self.deserialize(resp, body, TLDListModel)
|
return self.deserialize(resp, body, TLDListModel)
|
||||||
|
|
||||||
def get_tld(self, tld_id, **kwargs):
|
def get_tld(self, tld_id, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user