How to use the ox3apiclient.client_from_file function in ox3apiclient

To help you get started, we’ve selected a few ox3apiclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openx / OX3-Python-API-Client / tests / clientfromfile.py View on Github external
def test_returns_client(self):
        file_path = os.path.join(os.path.dirname(__file__), 'ox3rctest')
        ox = ox3apiclient.client_from_file(file_path=file_path)
        self.assertTrue(isinstance(ox, ox3apiclient.Client))
github openx / OX3-Python-API-Client / tests / clientfromfile.py View on Github external
def test_loads_alternate_env(self):
        file_path = os.path.join(os.path.dirname(__file__), 'ox3rctest')
        ox = ox3apiclient.client_from_file(file_path=file_path, env='dev')

        test_values = [
            'domain_dev',
            'consumer_secret_dev',
            'consumer_key_dev']

        loaded_values = [
            ox.domain,
            ox.consumer_key,
            ox.consumer_secret]

        test_values.sort()
        loaded_values.sort()
        self.assertEqual(loaded_values, test_values)
github openx / OX3-Python-API-Client / tests / clientfromfile.py View on Github external
def test_missing_required_option_raises_error(self):
        file_path = os.path.join(os.path.dirname(__file__), 'ox3rctest')
        self.assertRaises(
            Exception,
            ox3apiclient.client_from_file,
            file_path,
            'missing-required-option')
github openx / OX3-Python-API-Client / tests / clientfromfile.py View on Github external
def test_loads_default_env(self):
        file_path = os.path.join(os.path.dirname(__file__), 'ox3rctest')
        ox = ox3apiclient.client_from_file(file_path=file_path)

        test_values = [
            'domain',
            'consumer_secret',
            'consumer_key']

        loaded_values = [
            ox.domain,
            ox.consumer_key,
            ox.consumer_secret]

        test_values.sort()
        loaded_values.sort()
        self.assertEqual(loaded_values, test_values)
github openx / OX3-Python-API-Client / tests / clientfromfile.py View on Github external
def test_loads_optional_options(self):
        file_path = os.path.join(os.path.dirname(__file__), 'ox3rctest')
        ox = ox3apiclient.client_from_file(
                file_path=file_path,
                env='optional-options')

        test_values = [
            'domain',
            'consumer_secret',
            'consumer_key',
            'callback_url',
            'scheme',
            'request_token_url',
            'access_token_url',
            'authorization_url',
            'api_path',
            'email',
            'password']

ox3apiclient

Client to connect to the OpenX Enterprise API.

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis