コード例 #1
0
ファイル: first_tests.py プロジェクト: Hallborg/beg_stud_lit
def test_create_user():
    user_name = 'TestUser'
    password = '******'
    email = 'test-email'
    phone_nr = 'test-phone'
    location = 'test-location'
    msg, status_code = maria_f.create_user(
        user_name,
        password,
        email,
        phone_nr,
        location
    )
    assert status_created == status_code
コード例 #2
0
ファイル: app.py プロジェクト: Hallborg/beg_stud_lit
def create_user():
    '''Create a new user'''
    user_name = request.form.get('user_name')
    password = request.form.get('password')
    email = request.form.get('email')
    phone_nr = request.form.get('phone_nr')
    location = request.form.get('location')
    msg, status_code = maria_f.create_user(
        user_name,
        password,
        email,
        phone_nr,
        location
    )
    return make_response(msg, status_code)