mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-03-16 22:20:25 +00:00
Fix uservoice tests
Rewrite test_empty_key in the same way as in the other modules. Delete test_overridden_empty_key, because the Node (In this case, the UserVoiceNode) should not be created if there is no configuration initially.
This commit is contained in:
parent
add3baff74
commit
22403f9a03
1 changed files with 1 additions and 8 deletions
|
|
@ -40,14 +40,7 @@ class UserVoiceTagTestCase(TagTestCase):
|
|||
|
||||
@override_settings(USERVOICE_WIDGET_KEY='')
|
||||
def test_empty_key(self):
|
||||
r = UserVoiceNode().render(Context())
|
||||
self.assertEqual(r, "")
|
||||
|
||||
@override_settings(USERVOICE_WIDGET_KEY='')
|
||||
def test_overridden_empty_key(self):
|
||||
vars = {'uservoice_widget_key': 'bcdefghijklmnopqrstu'}
|
||||
r = UserVoiceNode().render(Context(vars))
|
||||
self.assertIn("widget.uservoice.com/bcdefghijklmnopqrstu.js", r)
|
||||
self.assertRaises(AnalyticalException, UserVoiceNode)
|
||||
|
||||
def test_overridden_key(self):
|
||||
vars = {'uservoice_widget_key': 'defghijklmnopqrstuvw'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue