| 1 |
Make strings unicode to fix test failures |
| 2 |
|
| 3 |
Python enables unicode by default. Various quoted strings used |
| 4 |
in tests were not declared as unicode and so caused false failures. |
| 5 |
This patch addresses this issue. |
| 6 |
|
| 7 |
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> |
| 8 |
Signed-off-by: Anthony G. Basile <blueness@gentoo.org> |
| 9 |
|
| 10 |
diff -rupN webapp-config-1.50.16/WebappConfig.orig/db.py webapp-config-1.50.16/WebappConfig/db.py |
| 11 |
--- webapp-config-1.50.16/WebappConfig.orig/db.py 2012-06-17 11:10:15.964264617 -0500 |
| 12 |
+++ webapp-config-1.50.16/WebappConfig/db.py 2012-06-17 11:11:05.364265831 -0500 |
| 13 |
@@ -186,7 +186,7 @@ class WebappDB(AppHierarchy): |
| 14 |
>>> sb = [i[1] for i in b.list_locations().items()] |
| 15 |
>>> sb.sort(lambda x,y: cmp(x[0]+x[1],y[0]+y[1])) |
| 16 |
>>> sb |
| 17 |
- [['gallery', '1.4.4_p6'], ['gallery', '2.0_rc2'], ['horde', '3.0.5'], ['phpldapadmin', '0.9.7_alpha4']] |
| 18 |
+ [[u'gallery', u'1.4.4_p6'], [u'gallery', u'2.0_rc2'], [u'horde', u'3.0.5'], [u'phpldapadmin', u'0.9.7_alpha4']] |
| 19 |
|
| 20 |
>>> c = WebappDB(here + '/tests/testfiles/webapps', |
| 21 |
... package = 'horde', version = '3.0.5') |
| 22 |
@@ -572,7 +572,7 @@ class WebappSource(AppHierarchy): |
| 23 |
... 'horde', '3.0.5') |
| 24 |
>>> d = a.get_source_directories('htdocs') |
| 25 |
>>> [i for i in d if i != '.svn'] |
| 26 |
- ['dir1', 'dir2'] |
| 27 |
+ [u'dir1', u'dir2'] |
| 28 |
''' |
| 29 |
dirs = [] |
| 30 |
|
| 31 |
@@ -604,7 +604,7 @@ class WebappSource(AppHierarchy): |
| 32 |
>>> a = WebappSource(here + '/tests/testfiles/share-webapps', |
| 33 |
... 'horde', '3.0.5') |
| 34 |
>>> a.get_source_files('htdocs') |
| 35 |
- ['test1', 'test2'] |
| 36 |
+ [u'test1', u'test2'] |
| 37 |
''' |
| 38 |
|
| 39 |
files = [] |