new-site/scripts/tests/test_data.py
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

79 lines
2.5 KiB
Python

"""
Synthetic test data factory for E2E CRTC order tests.
"""
import uuid
import time
def make_test_order():
"""Return a dict of test data for a full CRTC order."""
ts = int(time.time())
uid = uuid.uuid4().hex[:6]
return {
# Customer
"customer_name": "Test Carrier Corp",
"customer_email": f"testcarrier+{uid}@performancewest.net",
"customer_phone": "+13075559876",
# Company (numbered — simplest path, no name search)
"company_type": "numbered",
"legal_ending": "Ltd.",
"trade_name": "",
"name_choice_1": "",
"name_choice_2": "",
"name_choice_3": "",
# Director (split name fields — form uses first/middle/last)
"director_first_name": "John",
"director_middle_name": "",
"director_last_name": "Test",
"director_name": "John Test", # kept for PG assertion (stored as concat)
"director_country": "US",
"director_street": "525 Randall Avenue",
"director_street2": "Suite 100",
"director_city": "Cheyenne",
"director_province": "WY",
"director_postal": "82001",
"director_citizenship": "United States",
# Telecom
"service_description": "VoIP reseller services — hosted PBX, SIP trunking, and wholesale voice termination for North American businesses.",
"geographic_coverage": "BC and Worldwide",
"include_bits": True,
"existing_tollfree": "",
"existing_ca_did": "",
"accounting_software": "",
"own_ca_address": False,
"reg_contact_name": "John Test",
"reg_contact_email": f"testcarrier+{uid}@performancewest.net",
"reg_contact_phone": "+13075559876",
# Mailbox
"mailbox_location": "howe-st", # 329 Howe St — default
# Payment
"payment_method": "card",
# Stripe test card
"card_number": "4242424242424242",
"card_exp_month": "12",
"card_exp_year": "30",
"card_cvv": "123",
"card_zip": "82001",
# Domain (for Porkbun test)
"test_domain": f"testcarrier-{uid}.ca",
# Identifiers (populated during test)
"order_id": None,
"order_number": None,
"checkout_url": None,
"session_id": None,
"erpnext_order_name": None,
"erpnext_invoice_name": None,
"identity_session_id": None,
"domain_registered": None,
"did_provisioned": None,
"bc_number": None,
}