changeset 789:1466365bd395 pyntnclick

Add a test for loading a resource with a dialect.
author Stefano Rivera <stefano@rivera.za.net>
date Sat, 26 Jan 2013 20:11:17 +0200
parents abfa4f7e89a0
children 032c8c5563b8
files pyntnclick/tests/test_resources.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pyntnclick/tests/test_resources.py	Sat Jan 26 20:09:49 2013 +0200
+++ b/pyntnclick/tests/test_resources.py	Sat Jan 26 20:11:17 2013 +0200
@@ -32,6 +32,13 @@
                           data_path('en/thing'), data_path('thing')],
                          res.get_paths('thing'))
 
+    def test_get_paths_lang_dialect(self):
+        res = self.get_resource_loader('en_ZA')
+        self.assertEqual([test_path('en_ZA/thing'), test_path('en/thing'),
+                          test_path('thing'), data_path('en_ZA/thing'),
+                          data_path('en/thing'), data_path('thing')],
+                         res.get_paths('thing'))
+
     def test_get_resource_path_missing(self):
         try:
             self.res.get_resource_path('should_not_exist')