def __init__(self, client): """ Initializes a new GroupsAPI that will use the given client object to make HTTP requests. """ self._client = client self._argument_converter = ArgumentConverter( none_filter, stringify_booleans, )
def __init__(self, client): """ Initializes a new RelationshipsAPI that will use the given ``client`` object to make HTTP requests. """ self._client = client self._argument_converter = ArgumentConverter( IDExtractor(r"^(older|newer)_than|.*_id$"), flatten_lists, flatten_dicts, stringify_booleans, none_filter, )
def test_using_a_custom_regular_expression(self): converter = ArgumentConverter(IDExtractor(r'^(older|newer)_than$')) result = converter( older_than={"id": 1}, newer_than={"id": 2}, older_or_newer_than={"id": 3}, message_id={"id": 4}, ) self.assertEquals(1, result["older_than"]) self.assertEquals(2, result["newer_than"]) self.assertEquals({"id": 3}, result["older_or_newer_than"]) self.assertEquals({"id": 4}, result["message_id"])
def __init__(self, client): """ Initializes a new UsersAPI that will use the given client object to make HTTP requests. """ self._client = client self._argument_converter = ArgumentConverter( education_argument_converter, previous_companies_argument_converter, flatten_dicts, stringify_booleans, none_filter, )
def setUp(self): self.converter = ArgumentConverter(flatten_lists)
def setUp(self): self.converter = ArgumentConverter()
def setUp(self): self.converter = ArgumentConverter( flatten_dicts, flatten_lists, none_filter, )
def setUp(self): self.converter = ArgumentConverter(none_filter)
def setUp(self): self.converter = ArgumentConverter(IDExtractor())
def setUp(self): self.converter = ArgumentConverter(stringify_booleans)