Beispiel #1
0
def test_client_filename():
    config = {
        'client_id': 'client_id',
        'issuer': 'issuer',
        'client_secret': 'longenoughsupersecret',
        'base_url': 'https://example.com',
        'requests_dir': 'requests'
    }
    ci = ServiceContext(config=config)
    fname = ci.filename_from_webname('https://example.com/rq12345')
    assert fname == 'rq12345'
Beispiel #2
0
def test_client_filename():
    config = {
        'client_id': 'client_id',
        'issuer': 'issuer',
        'client_secret': 'longenoughsupersecret',
        'base_url': 'https://example.com',
        'requests_dir': 'requests'
    }
    service_context = ServiceContext(config=config)
    srvcnx2 = ServiceContext().load(service_context.dump())
    fname = srvcnx2.filename_from_webname('https://example.com/rq12345')
    assert fname == 'rq12345'