Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/formmail/test/test_formmail.py

Issue 29984589: 7123 - Fixes Pytest DeprecationWarning (Closed) Base URL: https://hg.adblockplus.org/sitescripts/
Patch Set: Created Jan. 17, 2019, 8:46 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/formmail/test/test_formmail.py
===================================================================
--- a/sitescripts/formmail/test/test_formmail.py
+++ b/sitescripts/formmail/test/test_formmail.py
@@ -101,7 +101,7 @@
del form_config[key]
with pytest.raises(Exception) as error:
formmail.make_handler('test', form_config)[1]
- assert error.value.message == message
+ assert str(error.value) == message
@pytest.mark.parametrize('field,message', [
@@ -152,14 +152,14 @@
form_config['fields'] = {}
with pytest.raises(Exception) as error:
formmail.make_handler('test', form_config)[1]
- assert error.value.message == 'No fields configured for form handler: test'
+ assert str(error.value) == 'No fields configured for form handler: test'
def test_config_template_errors(form_config):
form_config['template'].value = 'no'
with pytest.raises(Exception) as error:
formmail.make_handler('test', form_config)[1]
- assert error.value.message == 'Template not found at: no'
+ assert str(error.value) == 'Template not found at: no'
def test_config_parse(form_config):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld