def test_account_create_should_fail():
 credentials = [((c['user'], c['password']), e) for (c, e) in broken_credentials]
 for ((email, password), error) in credentials:
  error_obj = getattr(errors, error)
  with session_scope() as db_session:
   with pytest.raises(error_obj):
    create_account(db_session, email, password)

def test_account_create_should_fail ( ) : credentials = [ ( ( c [ 'user' ] , c [ 'password' ] ) , e ) for ( c , e ) in broken_credentials ] for ( ( email , password ) , error ) in credentials : error_obj = getattr ( errors , error ) with session_scope ( ) as db_session : with pytest . raises ( error_obj ) : create_account ( db_session , email , password )
test that creation fails with appropriate errors .