diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-09-18 14:35:14 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-09-18 14:35:14 +0200 |
| commit | d44831bb1d10ac1bc29690fd226209fb71b91b42 (patch) | |
| tree | 525b3d0dc4a6bb2c34e4533d5f0d3ba3a4b64a62 /tests | |
| parent | 69751ac5d60b35daddfe62219283b535892c7007 (diff) | |
| download | python-apt-d44831bb1d10ac1bc29690fd226209fb71b91b42.tar.gz | |
* python/apt_pkgmodule.cc:
add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants
- fix detection of cdrom sources and add test for it
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/data/sources.list.testDistribution | 2 | ||||
| -rw-r--r-- | tests/test_aptsources.py | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/data/sources.list.testDistribution b/tests/data/sources.list.testDistribution index 45c155e9..0f40e85a 100644 --- a/tests/data/sources.list.testDistribution +++ b/tests/data/sources.list.testDistribution @@ -9,3 +9,5 @@ deb http://ftp.debian.org/debian sid main deb http://ubuntu.cs.uaf.edu/ubuntu/ hardy main deb http://ubuntu.cs.uaf.edu/ubuntu/ hardy-backports main deb http://archive.ubuntu.com/ubuntu/ intrepid main +deb cdrom:[Ubuntu 8.10 _Intrepid Ibex_ - Alpha]/ intrepid main +deb cdrom:[Ubuntu 8.04 _Hardy Heron_] hardy main
\ No newline at end of file diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 4b2c7965..49fe6afa 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -83,6 +83,14 @@ class TestAptSources(unittest.TestCase): def testMatcher(self): apt_pkg.Config.Set("Dir::Etc::sourcelist","data/sources.list.testDistribution") + sources = aptsources.sourceslist.SourcesList() + distro = aptsources.distro.get_distro() + distro.get_sources(sources) + # test if all suits of the current distro were detected correctly + dist_templates = set() + for s in sources: + if not s.template: + self.fail("source entry '%s' has no matcher" % s) def testDistribution(self): apt_pkg.Config.Set("Dir::Etc::sourcelist","data/sources.list.testDistribution") |
