summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2012-05-23 13:41:15 +0200
committerDidier Raboud <odyx@debian.org>2012-05-23 14:56:49 +0200
commit1adcbc00fc1976cd8cfb778113a88fe846bdb035 (patch)
tree3679724b0b3b8a59939951f515f9466360e8b3e2 /test
parente64a2f849280cd5bf6fa3ea62749b938508c8fab (diff)
Py3: Fix parse_policy_line test for python3.
Git-Dch: None
Diffstat (limited to 'test')
-rw-r--r--test/test_lsb_release.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_lsb_release.py b/test/test_lsb_release.py
index 2673c52..85790c9 100644
--- a/test/test_lsb_release.py
+++ b/test/test_lsb_release.py
@@ -93,13 +93,13 @@ class TestLSBRelease(unittest.TestCase):
def test_parse_policy_line(self):
release_line = ''
- shortnames = lr.longnames.keys()
+ shortnames = list(lr.longnames.keys())
random.shuffle(shortnames)
longnames = {}
for shortname in shortnames:
longnames[lr.longnames[shortname]] = rnd_string(1,9)
release_line += shortname + '=' + longnames[lr.longnames[shortname]] + ','
- release_line = string.strip(release_line,',')
+ release_line = release_line[:-1]
self.assertEqual(sorted(lr.parse_policy_line(release_line)),sorted(longnames),'parse_policy_line(' + release_line + ')')
def test_sort_releases(self):