mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-05-18 20:21:15 +00:00
Use assertRaisesRegexp for get_required_setting test
This commit is contained in:
parent
f24998ef2d
commit
96ee34e671
1 changed files with 1 additions and 2 deletions
|
|
@ -36,9 +36,8 @@ class SettingDeletedTestCase(TestCase):
|
|||
"""
|
||||
Make sure using get_required_setting fails in the right place.
|
||||
"""
|
||||
with self.assertRaises(AnalyticalException) as e:
|
||||
with self.assertRaisesRegexp(AnalyticalException, "USER_ID setting: not found"):
|
||||
user_id = get_required_setting("USER_ID", "\d+", "invalid USER_ID")
|
||||
self.assertEqual(e.exception.message, "USER_ID setting: not found")
|
||||
|
||||
|
||||
class InternalIpTestCase(TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue