use pytest.param to contain marks like xfail or skip

This commit is contained in:
Leo Hemsted
2018-09-19 16:33:00 +01:00
parent 918e4b390f
commit 9021b43eb6
2 changed files with 5 additions and 4 deletions

View File

@@ -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,

View File

@@ -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,