示例#1
0
def _create_fixtures(app, sample_csids):
    fixture_output = os.environ.get(
        'FIXTURE_OUTPUT_PATH') or mockingbird._get_fixtures_path()
    cl = Client(app)
    cl.server.info.to_file(f'{fixture_output}/calnet_server_info.json')
    cl.server.schema.to_file(f'{fixture_output}/calnet_server_schema.json')
    conn = cl.connect()
    conn.search('ou=people,dc=berkeley,dc=edu',
                cl._csids_filter(sample_csids),
                attributes=ldap3.ALL_ATTRIBUTES)
    conn.response_to_file(f'{fixture_output}/calnet_search_entries.json',
                          raw=True)
    conn.unbind()
示例#2
0
文件: calnet.py 项目: pauline2k/boac
def _fixture_path(pattern):
    fixtures_path = mockingbird._get_fixtures_path()
    return '{}/calnet_{}.json'.format(fixtures_path, pattern)
示例#3
0
def _fixture_path(pattern):
    fixtures_path = mockingbird._get_fixtures_path()
    return f'{fixtures_path}/calnet_{pattern}.json'