summaryrefslogtreecommitdiff
path: root/tests/test_debfile.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-09-07 13:37:20 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-09-07 13:37:20 +0200
commit5498a3d94354732d215e23beeb9c07a47616cabb (patch)
tree1736eb4aa18d8025b688b08be843a8a0338725dc /tests/test_debfile.py
parentbc301a8f07e50c7a14973b10fa4cb95f7a2beff2 (diff)
parent3aaf50270475e0a2a5fc8e7783e2f8917f8ac327 (diff)
downloadpython-apt-5498a3d94354732d215e23beeb9c07a47616cabb.tar.gz
* add "provides" property to the apt.Version objects
* apt/debfile.py: - fix error when reading binary content and add regresion test * merged patch from Samuel Lidén Borell to fix crash if there utf8 in the control file (LP: #624290) and add test * apt/cache.py: - add "sources_list" parameter to cache.update() to force updating a single sources.list entry only * debian/control: - add missing build-depends on python-debian (needed to run the tests for apt.debfile.DebPackage()
Diffstat (limited to 'tests/test_debfile.py')
-rw-r--r--tests/test_debfile.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_debfile.py b/tests/test_debfile.py
index 42cda6f6..571c2ec9 100644
--- a/tests/test_debfile.py
+++ b/tests/test_debfile.py
@@ -1,4 +1,5 @@
#!/usr/bin/python
+# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Michael Vogt <mvo@ubuntu.com>
#
@@ -77,6 +78,12 @@ class TestDebfilee(unittest.TestCase):
"Unexpected result for package '%s' (got %s wanted %s)\n%s" % (
filename, res, expected_res, deb._failure_string))
+ def test_utf8_sections(self):
+ deb = apt.debfile.DebPackage(cache=self.cache)
+ deb.open(os.path.join("data","test_debs","utf8-package_1.0-1_all.deb"))
+ self.assertEqual(deb["Maintainer"],
+ "Samuel Lidén Borell <samuel@slbdata.se>")
+
def testContent(self):
# normal
deb = apt.debfile.DebPackage(cache=self.cache)