You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/14 10:18:02 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #18224: Emit explicit exception if user fails to add due to duplicated email

mik-laj commented on a change in pull request #18224:
URL: https://github.com/apache/airflow/pull/18224#discussion_r708125970



##########
File path: tests/test_utils/api_connexion_utils.py
##########
@@ -18,19 +18,22 @@
 from airflow.www.security import EXISTING_ROLES
 
 
-def create_user(app, username, role_name, permissions=None):
+def create_user(app, username, role_name, email=None, permissions=None):
     appbuilder = app.appbuilder
 
     # Removes user and role so each test has isolated test data.
     delete_user(app, username)
     delete_role(app, role_name)
     role = create_role(app, role_name, permissions)
 
+    if email is None:
+        email = f"{username}@fab.org"

Review comment:
       ```suggestion
           email = f"{username}@example.org"
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org