Exemple #1
0
def setup_module(module):
    import cosmo_test_lib
    cosmo_test_lib.setup_module(module)
    for i in range(1, 4):
        ics_name = 'float'+str(i)+'.ics'
        body = open(module.FILES_DIR+'/reports/put/'+ics_name).read()
        client.put('%s/%s/%s' % (module.PRINCIPAL_DAV_PATH, module.CALENDAR, ics_name), body=body, headers={'content-type':'text/calendar'})
        assert client.response.status == 201

    body = open(FILES_DIR+'mkcalendar/validFullBody.xml').read()
    client._request('MKCALENDAR', '%s/%s' % (PRINCIPAL_DAV_PATH, TIMEZONE_CALENDAR), body=body)
    
    for i in range(1, 4):
        ics_name = 'float'+str(i)+'.ics'
        body = open(module.FILES_DIR+'/reports/put/'+ics_name).read()
        client.put('%s/%s/%s' % (module.PRINCIPAL_DAV_PATH, module.TIMEZONE_CALENDAR, ics_name), body=body, headers={'content-type':'text/calendar'})
        assert client.response.status == 201
    
    assert client.response.status == 201
Exemple #2
0
def setup_module(module):
    cosmo_test_lib.setup_module(module)
    client = cosmoclient.CosmoClient(module.SERVER_URL)
    client.set_basic_auth(module.ADMIN_USER, module.ADMIN_PASS)
    module.client = client