From c839862aefded2e2f09f51afd448c8a3d015c409 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Thu, 6 Feb 2020 22:12:30 -0500 Subject: [PATCH] Testing mail service does not raise KeyError * KeyError raised when cloud_provider was used twice in mark parametrization. * Tox isn't working properly for me (collecting 17,000 files; obviously neglecting tox.ini and/or pytest.ini) --- tests/test_cookiecutter_generation.py | 41 +++++++-------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 5a569961..e8b341c9 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -47,39 +47,20 @@ def context(): ids=lambda id: f"wnoise:{id[0]}-cloud:{id[1]}", ) @pytest.mark.parametrize( - "cloud_provider,mail_service", + "mail_service", [ - ("AWS", "Amazon SES"), - ("AWS", "Mailgun"), - ("AWS", "Mailjet"), - ("AWS", "Mandrill"), - ("AWS", "Postmark"), - ("AWS", "Sendgrid"), - ("AWS", "SendinBlue"), - ("AWS", "SparkPost"), - ("AWS", "Plain/Vanilla Django-Anymail"), - - ("GCP", "Mailgun"), - ("GCP", "Mailjet"), - ("GCP", "Mandrill"), - ("GCP", "Postmark"), - ("GCP", "Sendgrid"), - ("GCP", "SendinBlue"), - ("GCP", "SparkPost"), - ("GCP", "Plain/Vanilla Django-Anymail"), - - ("None", "Mailgun"), - ("None", "Mailjet"), - ("None", "Mandrill"), - ("None", "Postmark"), - ("None", "Sendgrid"), - ("None", "SendinBlue"), - ("None", "SparkPost"), - ("None", "Plain/Vanilla Django-Anymail"), - + "Amazon SES", + "Mailgun", + "MailJet", + "Mandrill", + "Postmark", + "Sendgrid", + "SendinBlue", + "SparkPost", + "Plain/Vanilla Django-Anymail" # GCP or None (i.e. no cloud provider) + Amazon SES is not supported ], - ids=lambda id: f"cloud:{id[0]}-mail:{id[1]}", + ids=lambda id: f"mail:{id[0]}", ) def context_combination( windows,