summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-10 12:02:11 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-10 12:02:11 +0200
commita021109da0fb1e138adc912c44632f0956243769 (patch)
tree0a066ad2e84e7423932a41f9c9e4df7c10719d2d /tests
parent522d72a3abeacee8b6070481738f9c9edd0a6161 (diff)
downloadpython-apt-a021109da0fb1e138adc912c44632f0956243769.tar.gz
* added new "MirrorsFile" keyword for the DistInfo Tagfile
* look for mirros as well when matching distros
Diffstat (limited to 'tests')
-rw-r--r--tests/data/sources.list.testDistribution4
-rw-r--r--tests/test_aptsources.py13
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/data/sources.list.testDistribution b/tests/data/sources.list.testDistribution
index 031e4c51..1687c504 100644
--- a/tests/data/sources.list.testDistribution
+++ b/tests/data/sources.list.testDistribution
@@ -6,4 +6,6 @@ deb http://de.archive.ubuntu.com/ubuntu/ edgy-updates restricted
deb http://de.archive.ubuntu.com/ubuntu/ edgy-security main
deb http://de.archive.ubuntu.com/ubuntu/ edgy-security multiverse
deb http://ftp.debian.org/debian sid main
-deb http://de.archive.ubuntu.com/ubuntu/ breezy main \ No newline at end of file
+deb ftp://ubuntu.cs.utah.edu/pub/ubuntu/ubuntu/ breezy main
+deb ftp://ubuntu.cs.utah.edu/pub/ubuntu/ubuntu/ breezy-backports main
+deb http://archive.ubuntu.com/ubuntu/ hoary main
diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py
index 1db99e3c..3ee106be 100644
--- a/tests/test_aptsources.py
+++ b/tests/test_aptsources.py
@@ -81,6 +81,15 @@ class TestAptSources(unittest.TestCase):
sources = aptsources.SourcesList()
distro = aptsources.Distribution()
distro.get_sources(sources)
+ # test if all suits of the current distro were detected correctly
+ dist_templates = set()
+ for s in sources:
+ if s.template:
+ dist_templates.add(s.template.name)
+ #print dist_templates
+ for d in ["edgy","edgy-security","edgy-updates","hoary","breezy", "breezy-backports"]:
+ self.assertTrue(d in dist_templates)
+ # test enable
comp = "restricted"
distro.enable_component(sources, comp)
found = {}
@@ -103,8 +112,8 @@ class TestAptSources(unittest.TestCase):
found = {}
for entry in sources:
if (entry.type == "deb" and
- entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and
- "edgy" in entry.dist):
+ entry.template and
+ entry.template.name == "edgy"):
for c in entry.comps:
if c == comp:
if not found.has_key(entry.dist):