def _get_splunk(profile):
    config = __salt__['config.option'](profile)

    key = "splunk.{0}:{1}:{2}:{3}".format(
        config.get('host'),
        config.get('port'),
        config.get('username'),
        config.get('password')
    )

    if key not in __context__:
        __context__[key] = splunklib.client.connect(
            host=config.get('host'),
            port=config.get('port'),
            username=config.get('username'),
            password=config.get('password'))

    return __context__[key]
Check that a single photo can be added to an album
dataset/ETHPy150Open saltstack/salt/salt/modules/splunk.py/_get_splunk--crossover with--dataset/ETHPy150Open photo/openphoto-python/tests/unit/test_albums.py/TestAlbumAdd.test_album_add_single