summaryrefslogtreecommitdiff
path: root/cliapp/settings_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-03-12 11:44:11 +0000
committerLars Wirzenius <liw@liw.fi>2011-03-12 11:44:11 +0000
commit7c7eb8b863a23c318fea155d64085df1c0bd4a09 (patch)
tree89934ff1455dd48a58a928c43afbb1e7107061a9 /cliapp/settings_tests.py
parenta853970fcf17c88fcaabd72014bb6fc503dcf8a2 (diff)
downloadcliapp-7c7eb8b863a23c318fea155d64085df1c0bd4a09.tar.gz
Make Settings.listconfs sort the filenames.
Need to figure out a way to sort things independent of locale.
Diffstat (limited to 'cliapp/settings_tests.py')
-rw-r--r--cliapp/settings_tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cliapp/settings_tests.py b/cliapp/settings_tests.py
index 1e0d148..0869391 100644
--- a/cliapp/settings_tests.py
+++ b/cliapp/settings_tests.py
@@ -191,3 +191,9 @@ class SettingsTests(unittest.TestCase):
names = self.settings.listconfs('.', listdir=mock_listdir)
self.assertEqual(names, ['./foo.conf'])
+ def test_listconfs_sorts_names_in_C_locale(self):
+ def mock_listdir(dirname):
+ return ['foo.conf', 'bar.conf']
+ names = self.settings.listconfs('.', listdir=mock_listdir)
+ self.assertEqual(names, ['./bar.conf', './foo.conf'])
+