def test_locales_template(self, render_mock): req = RequestFactory().get('/firefox/sync/') req.locale = 'de' views.sync(req) render_mock.assert_called_once_with(req, 'firefox/sync.html')