From 3e90bbc50a74b7612fbe97313d9f63d4c06d736f Mon Sep 17 00:00:00 2001 From: Alex Zorkin Date: Wed, 11 Dec 2024 13:25:13 -0800 Subject: [PATCH] chore: add test environment users --- .../seeders/test/test_user_profile_seeder.py | 203 +++++++++++++----- 1 file changed, 145 insertions(+), 58 deletions(-) diff --git a/backend/lcfs/db/seeders/test/test_user_profile_seeder.py b/backend/lcfs/db/seeders/test/test_user_profile_seeder.py index 23a29b521..d367948fd 100644 --- a/backend/lcfs/db/seeders/test/test_user_profile_seeder.py +++ b/backend/lcfs/db/seeders/test/test_user_profile_seeder.py @@ -16,85 +16,172 @@ async def seed_test_user_profiles(session): # Define the user profiles to seed user_profiles_to_seed = [ { - "keycloak_email": "john.doe1@example.tld", - "keycloak_username": "john_doe_01", - "email": "john.doe1@example.tld", - "title": "Developer", - "phone": "+1-555-123-4567", - "mobile_phone": "+1-555-234-5678", - "first_name": "John", - "last_name": "Doe", + "keycloak_email": "stuart.galloway@gov.bc.ca", + "keycloak_username": "SGALLOWA", + "email": "stuart.galloway@gov.bc.ca", + "title": "Sr. UX Practitioner", + "phone": "1234567890", + "mobile_phone": "1234567890", + "first_name": "Stuart", + "last_name": "Galloway", + "organization_id": None, + "is_active": True, + }, + { + "keycloak_email": "daniel.haselhan@gov.bc.ca", + "keycloak_username": "DHASELHA", + "email": "daniel.haselhan@gov.bc.ca", + "title": "Dev", + "phone": "1234567890", + "mobile_phone": "1234567890", + "first_name": "Daniel", + "last_name": "Haselhan", + "organization_id": None, + "is_active": True, + }, + { + "keycloak_email": "Haris.Ishaq@gov.bc.ca", + "keycloak_username": "HISHAQ", + "email": "Haris.Ishaq@gov.bc.ca", + "title": "Chief Engineer", + "phone": None, + "mobile_phone": None, + "first_name": "Haris", + "last_name": "Ishaq", + "organization_id": None, + "is_active": True, + }, + { + "keycloak_email": "shannon.payne@gov.bc.ca", + "keycloak_username": "shpayne", + "email": "shannon.payne@gov.bc.ca", + "title": "Chief Engineer", + "phone": None, + "mobile_phone": None, + "first_name": "Shannon", + "last_name": "Payne", + "organization_id": None, + "is_active": True, + }, + { + "keycloak_email": "tfrs@gov.bc.ca", + "keycloak_username": "LCFS1_bat", + "email": "tfrs@gov.bc.ca", + "title": "CEO", + "phone": None, + "mobile_phone": None, + "first_name": "Donald", + "last_name": "Freeman", "organization_id": 1, + "is_active": True, }, { - "keycloak_email": "jane.smith2@example.tld", - "keycloak_username": "jane_smith_02", - "email": "jane.smith2@example.tld", + "keycloak_email": "alex.zorkin@gov.bc.ca", + "keycloak_username": "ALZORKIN", + "email": "alex.zorkin@gov.bc.ca", "title": "Developer", - "phone": "+1-555-345-6789", - "mobile_phone": "+1-555-456-7890", - "first_name": "Jane", - "last_name": "Smith", - "organization_id": 2, + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, + "is_active": True, + "first_name": "Alex", + "last_name": "Zorkin", }, { - "keycloak_email": "alice.jones3@example.tld", - "keycloak_username": "alice_jones_03", - "email": "alice.jones3@example.tld", + "keycloak_email": "hamed.valiollahibayeki@gov.bc.ca", + "keycloak_username": "HVALIOLL", + "email": "hamed.valiollahibayeki@gov.bc.ca", "title": "Developer", - "phone": "+1-555-567-8901", - "mobile_phone": "+1-555-678-9012", - "first_name": "Alice", - "last_name": "Jones", - "organization_id": 3, + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, + "is_active": True, + "first_name": "Hamed", + "last_name": "Bayeki", }, { - "keycloak_email": "idir@test.tld", - "keycloak_username": "IDIRUSER", - "email": "user@test.tld", + "keycloak_email": "kevin.hashimoto@gov.bc.ca", + "keycloak_username": "KHASHIMO", + "email": "kevin.hashimoto@gov.bc.ca", "title": "Developer", - "phone": "+1-555-789-0123", - "mobile_phone": "+1-555-890-1234", - "first_name": "Bob", - "last_name": "Johnson", + "phone": "1234567890", + "mobile_phone": "1234567890", "organization_id": None, "is_active": True, + "first_name": "Kevin", + "last_name": "Hashimoto", }, { - "keycloak_email": "bceid@test.tld", - "keycloak_username": "BCEIDUSER", - "email": "user@test.tld", + "keycloak_email": "prashanth.venkateshappa@gov.bc.ca", + "keycloak_username": "PVENKATE", + "email": "prashanth.venkateshappa@gov.bc.ca", "title": "Developer", - "phone": "+1-555-901-2345", - "mobile_phone": "+1-555-012-3456", - "first_name": "Charlie", - "last_name": "Brown", - "organization_id": 2, + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, "is_active": True, + "first_name": "Prashanth", + "last_name": "V", }, { - "keycloak_email": "active@test.tld", - "keycloak_username": "ACTIVEUSER", - "email": "user@test.tld", - "title": "Developer", - "phone": "+1-555-234-5678", - "mobile_phone": "+1-555-345-6789", - "first_name": "Diana", - "last_name": "Evans", - "organization_id": 3, + "keycloak_email": "justin.lepitzki@gov.bc.ca", + "keycloak_username": "JLEPITZ", + "email": "justin.lepitzki@gov.bc.ca", + "title": "Admin", + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, "is_active": True, + "first_name": "Justin", + "last_name": "Lepitzki", }, { - "keycloak_email": "inactive@test.tld", - "keycloak_username": "INACTIVEUSER", - "email": "user@test.tld", + "keycloak_email": "lindsy.grunert@gov.bc.ca", + "keycloak_username": "LGRUNERT", + "email": "lindsy.grunert@gov.bc.ca", + "title": "Admin", + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, + "is_active": True, + "first_name": "Lindsy", + "last_name": "Grunert", + }, + { + "keycloak_email": "Arturo.Reyes-Lopez@gov.bc.ca", + "keycloak_username": "ARTREYES", + "email": "Arturo.Reyes-Lopez@gov.bc.ca", "title": "Developer", - "phone": "+1-555-456-7890", - "mobile_phone": "+1-555-567-8901", - "first_name": "Eve", - "last_name": "Harris", - "organization_id": 3, - "is_active": False, + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, + "is_active": True, + "first_name": "Arturo", + "last_name": "Reyes", + }, + { + "keycloak_email": "alasdair.ring@gov.bc.ca", + "keycloak_username": "AIRING", + "email": "alasdair.ring@gov.bc.ca", + "title": "Product Owner", + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, + "is_active": True, + "first_name": "Al", + "last_name": "Ring", + }, + { + "keycloak_email": "rebekah.ford@gov.bc.ca", + "keycloak_username": "RRFORD", + "email": "rebekah.ford@gov.bc.ca", + "title": "Scrum Master", + "phone": "1234567890", + "mobile_phone": "1234567890", + "organization_id": None, + "is_active": True, + "first_name": "Rebekah", + "last_name": "Ford", }, ] @@ -112,7 +199,7 @@ async def seed_test_user_profiles(session): except Exception as e: context = { - "function": "seed_test_user_profiles", + "function": "seed_test_user_profiles", } logger.error( "Error occurred while seeding user profiles",