mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-14 23:15:06 +02:00
updated some error handling, logging, and text of emails
This commit is contained in:
parent
82b097d2f6
commit
91aaa0ff3e
4 changed files with 52 additions and 26 deletions
|
@ -29,16 +29,21 @@ class Command(BaseCommand):
|
|||
)
|
||||
|
||||
def handle(self, **options):
|
||||
"""Delete existing TransitionDomains. Generate test ones."""
|
||||
"""Delete existing TransitionDomains. Generate test ones.
|
||||
expects options[emails]; emails will be assigned to transition
|
||||
domains at the time of creation"""
|
||||
|
||||
# split options[emails] into an array of test emails
|
||||
test_emails = options["emails"].split(",")
|
||||
|
||||
# setting up test data
|
||||
self.delete_test_transition_domains()
|
||||
self.load_test_transition_domains(test_emails)
|
||||
if len(test_emails) > 0:
|
||||
# set up test data
|
||||
self.delete_test_transition_domains()
|
||||
self.load_test_transition_domains(test_emails)
|
||||
else:
|
||||
logger.error("list of emails for testing is required")
|
||||
|
||||
def load_test_transition_domains(self, test_emails):
|
||||
def load_test_transition_domains(self, test_emails: list):
|
||||
"""Load test transition domains"""
|
||||
|
||||
# counter for test_emails index
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue