diff options
| author | Mads Jensen <mje@inducks.org> | 2017-05-28 21:37:21 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-07-29 19:07:23 -0400 |
| commit | a51c4de1945be2225f20fad794cfb52d8f1f9236 (patch) | |
| tree | 36386b70a27cf027a8a491de319c3e59e0d3d0cd /tests/syndication_tests/tests.py | |
| parent | 38988f289f7f5708f5ea85de2d5dfe0d86b23106 (diff) | |
Used assertRaisesMessage() to test Django's error messages.
Diffstat (limited to 'tests/syndication_tests/tests.py')
| -rw-r--r-- | tests/syndication_tests/tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/syndication_tests/tests.py b/tests/syndication_tests/tests.py index 28fe026414..e98ac354b0 100644 --- a/tests/syndication_tests/tests.py +++ b/tests/syndication_tests/tests.py @@ -452,7 +452,11 @@ class SyndicationFeedTest(FeedTestCase): An ImproperlyConfigured is raised if no link could be found for the item(s). """ - with self.assertRaises(ImproperlyConfigured): + msg = ( + 'Give your Article class a get_absolute_url() method, or define ' + 'an item_link() method in your Feed class.' + ) + with self.assertRaisesMessage(ImproperlyConfigured, msg): self.client.get('/syndication/articles/') def test_template_feed(self): |
