How to use the investpy.get_certificates function in investpy

To help you get started, we’ve selected a few investpy 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 alvarob96 / investpy / tests / test_investpy.py View on Github external
def test_investpy_certificates():
    """
    This function checks that certificate data retrieval functions listed in investpy work properly.
    """

    params = [
        {
            'country': 'france',
        },
        {
            'country': None,
        },
    ]

    for param in params:
        investpy.get_certificates(country=param['country'])
        investpy.get_certificates_list(country=param['country'])

    params = [
        {
            'country': None,
            'columns': ['full_name', 'name'],
            'as_json': True
        },
        {
            'country': None,
            'columns': ['full_name', 'name'],
            'as_json': False
        },
        {
            'country': 'france',
            'columns': ['full_name', 'name'],
github alvarob96 / investpy / tests / test_investpy_errors.py View on Github external
"""
    This function raises errors on certificate retrieval functions.
    """

    params = [
        {
            'country': ['error']
        },
        {
            'country': 'error'
        }
    ]

    for param in params:
        try:
            investpy.get_certificates(country=param['country'])
        except:
            pass

    params = [
        {
            'country': ['error']
        },
        {
            'country': 'error'
        }
    ]

    for param in params:
        try:
            investpy.get_certificates_list(country=param['country'])
        except: