Example #1
0
File: config.py Project: mlv/ADNpy
    def setUp(self):
        self.api = API.build_api()
        self.username = username
        if access_token:
            self.api.add_authorization_token(access_token)

        self.client_id = client_id
        self.client_secret = client_secret

        if use_replay:
            start_replay('tests/data/record.json', headers_key=filter_headers_key(['Authorization']))
Example #2
0
    def setUp(self):
        self.api = API.build_api()
        self.username = username
        if access_token:
            self.api.add_authorization_token(access_token)

        self.client_id = client_id
        self.client_secret = client_secret

        if use_replay:
            start_replay('tests/data/record.json',
                         headers_key=filter_headers_key(['Authorization']))
Example #3
0
 def replay(self):
     return with_replay(
         self._replay_file_name(),
         url_key=filter_query_params_key(["access_token"]),
         headers_key=filter_headers_key(["User-Agent"]),
     )