← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~smoser/cloud-init:fix/locale-test-update into cloud-init:master

 

Scott Moser has proposed merging ~smoser/cloud-init:fix/locale-test-update into cloud-init:master.

Requested reviews:
  cloud-init commiters (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/328095
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/locale-test-update into cloud-init:master.
diff --git a/tests/cloud_tests/testcases/modules/locale.py b/tests/cloud_tests/testcases/modules/locale.py
index 63e53ff..cb9e1dc 100644
--- a/tests/cloud_tests/testcases/modules/locale.py
+++ b/tests/cloud_tests/testcases/modules/locale.py
@@ -3,14 +3,17 @@
 """cloud-init Integration Test Verify Script."""
 from tests.cloud_tests.testcases import base
 
+from cloudinit import util
+
 
 class TestLocale(base.CloudTestCase):
     """Test locale is set properly."""
 
     def test_locale(self):
         """Test locale is set properly."""
-        out = self.get_data_file('locale_default')
-        self.assertIn('LANG="en_GB.UTF-8"', out)
+        data = util.load_shell_content(self.get_data_file('locale_default'))
+        self.assertIn("LANG", data)
+        self.assertEqual('en_GB.UTF-8', data['LANG'])
 
     def test_locale_a(self):
         """Test locale -a has both options."""

Follow ups