test_jsi18n_url.py 424 B

123456789101112
  1. from django.conf import settings
  2. from django.test import TestCase
  3. from django.urls import reverse
  4. class JsI18nUrlTests(TestCase):
  5. def test_js_i18n_url_cache_buster(self):
  6. """js i18n catalog link has cachebuster with lang code"""
  7. url = '{}?{}'.format(reverse('django-i18n'), settings.LANGUAGE_CODE)
  8. response = self.client.get(reverse('misago:index'))
  9. self.assertContains(response, url)