From 9021b43eb6573746ed96bb7f4b22fe11603ff054 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Wed, 19 Sep 2018 16:33:00 +0100 Subject: [PATCH] use pytest.param to contain marks like xfail or skip --- tests/app/dao/notification_dao/test_notification_dao.py | 4 ++-- tests/app/notifications/rest/test_send_notification.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/app/dao/notification_dao/test_notification_dao.py b/tests/app/dao/notification_dao/test_notification_dao.py index 029d41e34..0c3eafd11 100644 --- a/tests/app/dao/notification_dao/test_notification_dao.py +++ b/tests/app/dao/notification_dao/test_notification_dao.py @@ -1405,8 +1405,8 @@ def test_dao_get_notifications_by_to_field_escapes( '(0)7700 9001', '4477009001', '+4477009001', - pytest.mark.skip('+44077009001', reason='No easy way to normalise this'), - pytest.mark.skip('+44(0)77009001', reason='No easy way to normalise this'), + pytest.param('+44077009001', marks=pytest.mark.skip(reason='No easy way to normalise this')), + pytest.param('+44(0)77009001', marks=pytest.mark.skip(reason='No easy way to normalise this')), ]) def test_dao_get_notifications_by_to_field_matches_partial_phone_numbers( sample_template, diff --git a/tests/app/notifications/rest/test_send_notification.py b/tests/app/notifications/rest/test_send_notification.py index 59e1244eb..256c504f2 100644 --- a/tests/app/notifications/rest/test_send_notification.py +++ b/tests/app/notifications/rest/test_send_notification.py @@ -161,11 +161,12 @@ def test_send_notification_with_placeholders_replaced(notify_api, sample_email_t ), '6', ), - pytest.mark.xfail(( + pytest.param( None, ('we consider None equivalent to missing personalisation'), '', - )), + marks=pytest.mark.xfail + ), ]) def test_send_notification_with_placeholders_replaced_with_unusual_types( client,