예제 #1
0
def test_user_api_admin_delete(session,admin1_logged):
    '''Admin API delete call by Admin'''   
    #successful admin deletion
    admin1 = Admin.query.filter_by(email='*****@*****.**').first()  
    admin2 = Admin.query.filter_by(email='*****@*****.**').first()  
    check_api_delete_error(url_for('admin.user_api',id=admin1.id))
    check_api_delete_error(url_for('admin.user_api',id=admin2.id))
예제 #2
0
def test_user_api_admin_delete(session, admin1_logged):
    '''Admin API delete call by Admin'''
    #successful admin deletion
    admin1 = Admin.query.filter_by(email='*****@*****.**').first()
    admin2 = Admin.query.filter_by(email='*****@*****.**').first()
    check_api_delete_error(url_for('admin.user_api', id=admin1.id))
    check_api_delete_error(url_for('admin.user_api', id=admin2.id))
예제 #3
0
def test_aclient_api_admin_delete(session,admin1_logged):
    '''Client API delete call by Admin'''   
    #successful client deletion

    client1 = Client.query.filter_by(email='*****@*****.**').first()
    client2 = Client.query.filter_by(email='*****@*****.**').first() 
    check_api_delete(url_for('admin.client_api',id=client1.id))
    check_api_delete_error(url_for('admin.client_api',id=client2.id))
예제 #4
0
def test_aclient_api_admin_delete(session, admin1_logged):
    '''Client API delete call by Admin'''
    #successful client deletion

    client1 = Client.query.filter_by(email='*****@*****.**').first()
    client2 = Client.query.filter_by(email='*****@*****.**').first()
    check_api_delete(url_for('admin.client_api', id=client1.id))
    check_api_delete_error(url_for('admin.client_api', id=client2.id))
예제 #5
0
def test_device_api_client_delete(session,client1_logged):
    '''Device API post call by Client'''
    site1 = Wifisite.query.filter_by(unifi_id='site1').first()    
    check_api_delete_error(url_for('admin.device_api',id=site1.id),'Not Allowed')
예제 #6
0
def test_ap_api_admin_delete(session,admin1_logged):
    '''Accesspoint API post call by Admin'''
    site1 = Wifisite.query.filter_by(unifi_id='site1').first()    
    check_api_delete_error(url_for('admin.ap_api',id=site1.id),'Not Allowed')
예제 #7
0
def test_device_api_client_delete(session, client1_logged):
    '''Device API post call by Client'''
    site1 = Wifisite.query.filter_by(unifi_id='site1').first()
    check_api_delete_error(url_for('admin.device_api', id=site1.id),
                           'Not Allowed')
예제 #8
0
def test_ap_api_admin_delete(session, admin1_logged):
    '''Accesspoint API post call by Admin'''
    site1 = Wifisite.query.filter_by(unifi_id='site1').first()
    check_api_delete_error(url_for('admin.ap_api', id=site1.id), 'Not Allowed')