1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-10 06:48:19 +02:00

Run integration tests just once per test run.

This commit is contained in:
Adam Coddington 2020-12-06 17:47:43 -08:00
parent 68d3fae446
commit 78612f34a1
2 changed files with 9 additions and 1 deletions

View file

@ -42,6 +42,14 @@ class EmailMessageTestCase(TestCase):
self.mailbox = Mailbox.objects.create(from_email='from@example.com')
integration_testing_enabled = os.environ.get('INTEGRATION')
if not (
integration_testing_enabled and int(integration_testing_enabled)
):
self.skipTest(
"Integration tests skipped; to enable, set INTEGRATION=1"
)
self.test_account = os.environ.get('EMAIL_ACCOUNT')
self.test_password = os.environ.get('EMAIL_PASSWORD')
self.test_smtp_server = os.environ.get('EMAIL_SMTP_SERVER')