mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 18:39:21 +02:00
Fix test case for sending invitations by email
This commit is contained in:
parent
ab35221724
commit
a7804b35ea
2 changed files with 15 additions and 8 deletions
|
@ -272,11 +272,12 @@ class TestLogins(TestCase):
|
|||
|
||||
# this is one of the email addresses in data/test_contacts.txt
|
||||
output_stream = StringIO()
|
||||
call_command("send_domain_invitations",
|
||||
stdout=output_stream)
|
||||
# also have to re-point the logging handlers to output_stream
|
||||
with less_console_noise(output_stream):
|
||||
call_command("send_domain_invitations", "testuser@gmail.com", stdout=output_stream)
|
||||
|
||||
# Check that we had the right numbers in our output
|
||||
output = output_stream.getvalue()
|
||||
print("Output:", output)
|
||||
# should only be one domain we send email for
|
||||
self.assertIn("Found 1 transition domains", output)
|
||||
self.assertTrue("would send email to testuser@gmail.com", output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue