def demo_error(l):
     """Fail registration due to invalid demographics."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['demo']['age'] = 'invalid_age'
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
 def country_error(l):
     """Fail registration due to an invalid country."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['country'] = 'invalid_country_code'
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
 def usertype_error(l):
     """Fail registration due to an invalid user type."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['usertype'] = 'invalid_user_type'
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
 def email_error(l):
     """Fail registration due to an invalid email address."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['email'] = 'invalid_email_address'
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
 def affiliation_error(l):
     """Fail registration due to an invalid affiliation."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['affiliation'] = ''
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
 def password_error(l):
     """Fail registration due to an invalid password."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['password'] = '******'
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
Exemple #7
0
 def username_error(l):
     """Fail registration due to an invalid username."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics["username"] = ""
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
 def require_parent_email_error(l):
     """Fail registration due to an invalid parent email."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics['demo']['age'] = '13-17'
     user_demographics['demo']['parentemail'] = 'invalid_email'
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
Exemple #9
0
 def require_parent_email_error(l):
     """Fail registration due to an invalid parent email."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     user_demographics["demo"]["age"] = "13-17"
     user_demographics["demo"]["parentemail"] = "invalid_email"
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
Exemple #10
0
 def missing_field_error(l):
     """Fail registration due to a missing required field."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     to_delete = random.choice([
         'username', 'password', 'email', 'affiliation', 'country',
         'usertype', 'demo'
     ])
     del user_demographics[to_delete]
     register_and_expect_failure(l, user_demographics)
     l.interrupt()
Exemple #11
0
 def missing_field_error(l):
     """Fail registration due to a missing required field."""
     simulate_loading_login_page(l)
     user_demographics = generate_user()
     to_delete = random.choice([
         "username",
         "password",
         "email",
         "affiliation",
         "country",
         "usertype",
         "demo",
     ])
     del user_demographics[to_delete]
     register_and_expect_failure(l, user_demographics)
     l.interrupt()