ソースを参照

HUE-1313 [core] Unicode error in check_config

Romain Rigaux 12 年 前
コミット
9bc7f39e9b

+ 2 - 1
apps/about/src/about/templates/admin_wizard.mako

@@ -15,6 +15,7 @@
 ## limitations under the License.
 <%!
 from desktop.views import commonheader, commonfooter
+from django.utils.encoding import smart_unicode
 from django.utils.translation import ugettext as _
 %>
 
@@ -67,7 +68,7 @@ ${ commonheader(_('Quick Start'), "quickstart", user, "100px") | n,unicode }
           <h5>${ _('Check your current configuration') }</h5>
         </div>
         <div class="widget-content">
-          ${ check_config | n,unicode }
+          ${ check_config | n,smart_unicode }
         </div>
       </div>
     </div>

+ 4 - 0
apps/about/src/about/tests.py

@@ -53,6 +53,10 @@ class TestAbout(TestAboutBase, OozieBase):
 
 class TestAboutWithNoCluster(TestAboutBase):
 
+  def test_dump_config(self):
+    # Exception raised if bad unicode
+    self.client_admin.get(reverse('about:index'), HTTP_ACCEPT_LANGUAGE='fr-fr')
+
   def test_collect_usage(self):
     collect_usage = Settings.get_settings().collect_usage