def test_checks_template_by_default(self, tht_mock, lfht_mock): helpers.l10n_has_tag( { 'langfile': 'dude', 'template': 'home.html', 'LANG': 'de' }, 'abide') tht_mock.assert_called_with('home.html', 'de', 'abide') self.assertFalse(lfht_mock.called)
def test_uses_langfile(self, lfht_mock): """If langfile param specified should only check that file.""" helpers.l10n_has_tag({ 'langfile': 'dude', 'LANG': 'fr' }, 'abide', langfile='uli') lfht_mock.assert_called_with('uli', 'fr', 'abide')
def test_override_langfile(self, lfht_mock): helpers.l10n_has_tag({'langfile': 'dude'}, 'abide', 'uli') lfht_mock.assert_called_with('uli', tag='abide')
def test_gets_right_langfile(self, lfht_mock): helpers.l10n_has_tag({'langfile': 'dude'}, 'abide') lfht_mock.assert_called_with('dude', tag='abide')
def test_checks_template_by_default(self, tht_mock, lfht_mock): helpers.l10n_has_tag({'langfile': 'dude', 'template': 'home.html', 'LANG': 'de'}, 'abide') tht_mock.assert_called_with('home.html', 'de', 'abide') self.assertFalse(lfht_mock.called)
def test_uses_langfile(self, lfht_mock): """If langfile param specified should only check that file.""" helpers.l10n_has_tag({'langfile': 'dude', 'LANG': 'fr'}, 'abide', langfile='uli') lfht_mock.assert_called_with('uli', 'fr', 'abide')
def test_checks_template_by_default(self, tht_mock, lfht_mock): helpers.l10n_has_tag({"langfile": "dude", "template": "home.html", "LANG": "de"}, "abide") tht_mock.assert_called_with("home.html", "de", "abide") self.assertFalse(lfht_mock.called)
def test_uses_langfile(self, lfht_mock): """If langfile param specified should only check that file.""" helpers.l10n_has_tag({"langfile": "dude", "LANG": "fr"}, "abide", langfile="uli") lfht_mock.assert_called_with("uli", "fr", "abide")