Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update User Fixtures #473

Merged
merged 3 commits into from
Jan 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions backend/api/fixtures/test/0000_add_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,72 @@ class AddUsers(OperationalDataScript):
"first_name": "Alasdair",
"last_name": "Ring",
"display_name": "Alasdair Ring",
"username": "AIRING"
"username": "AIRING",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Emily",
"last_name": "Hillier",
"display_name": "Emily Hillier",
"username": "EMHILLIE"
"username": "EMHILLIE",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "James",
"last_name": "Donald",
"display_name": "James Donald",
"username": "JADONALD"
"username": "JADONALD",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Katie",
"last_name": "Menke",
"display_name": "Katie Menke",
"username": "KMENKE"
"username": "KMENKE",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Kristin",
"last_name": "Lefler",
"display_name": "Kristin Lefler",
"username": "KLEFLER"
"username": "KLEFLER",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Kuan",
"last_name": "Fan",
"display_name": "Kuan Fan",
"username": "KFAN"
"username": "KFAN",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Richard",
"last_name": "Tan",
"display_name": "Richard Tan",
"username": "RTAN"
"username": "RTAN",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Anton",
"last_name": "Coetzer",
"display_name": "Anton Coetzer",
"username": "ALCOETZE"
"username": "ALCOETZE",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Navpreet",
"last_name": "Grewal",
"display_name": "Navpreet Grewal",
"username": "NXGREWAL",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}, {
"first_name": "Molly",
"last_name": "Pilchar",
"display_name": "Molly Pilchar",
"username": "MPILCHAR",
"email": "[email protected]",
"keycloak_email": "[email protected]"
}]

def check_run_preconditions(self):
Expand All @@ -76,6 +106,8 @@ def run(self):
last_name=user.get("last_name"),
organization=organization,
username=user.get("username"),
email=user.get("email"),
keycloak_email=user.get("keycloak_email"),
defaults={
"is_active": True,
"display_name": user.get("display_name")
Expand Down