Пример #1
0
def login_fail(username, password):
    res = requests.post(urls.login_url(), auth=(username, password))
    # print( res )

    if res.status_code != 403:
        print('error: {0} login fail fail'.format(username))
        exit(1)

    print('{0} login fail'.format(username))
Пример #2
0
def login_success(username, password):
    res = requests.post(urls.login_url(),
                        auth=(username, password),
                        verify=False)
    # print( res )

    if res.status_code != 201:
        print('error: {0} login fail'.format(username))
        exit(1)

    print('{0} login success'.format(username))