Skip to content

Commit 2550ab6

Browse files
author
Christoph Lutz
committed
added testcase for Codename attribute
1 parent 12ad8c7 commit 2550ab6

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

test/testRepository.ref

+20
Original file line numberDiff line numberDiff line change
@@ -372,3 +372,23 @@ INFO apt_repos.Repository: Scanning Repository 'Main Ubuntu Repository' (htt
372372
Suite: ubuntu:trusty
373373
Tags: ['common1', 'z_last']
374374
TrustedGPG: ./gpg/ubuntu.gpg
375+
376+
Repository 'Testing Option Codename and url without trailing /' (http://deb.debian.org/debian/)
377+
INFO apt_repos.Repository: Scanning Repository 'Testing Option Codename and url without trailing /' (http://deb.debian.org/debian/)
378+
Results for 'debian', 'stable':
379+
Architectures: ['i386', 'amd64']
380+
DebSrc: True
381+
SourcesList: deb http://deb.debian.org/debian/ stretch main contrib non-free
382+
Suite: debian:stable
383+
Tags: []
384+
TrustedGPG: ./gpg/ubuntu.gpg
385+
Results for 'debian', 'stretch':
386+
INFO apt_repos.Repository: Scanning Repository 'Testing Option Codename and url without trailing /' (http://deb.debian.org/debian/)
387+
Results for 'debian', 'unstable':
388+
Architectures: ['i386', 'amd64']
389+
DebSrc: True
390+
SourcesList: deb http://deb.debian.org/debian/ sid main contrib non-free
391+
Suite: debian:unstable
392+
Tags: []
393+
TrustedGPG: ./gpg/ubuntu.gpg
394+
Results for 'debian', 'sid':

test/test_lib_apt_repos.py

+17
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,23 @@ def testRepository():
264264
dumpQuerySuiteDescsResult(repo, "ubuntu", "bionic")
265265
dumpQuerySuiteDescsResult(repo, "ubuntu", "trusty")
266266

267+
repo = Repository(mergedict(basisRepoDesc, {
268+
"Repository" : "Testing Option Codename and url without trailing /",
269+
"Prefix" : "debian",
270+
"Url" : "http://deb.debian.org/debian",
271+
"Codename" : "sid",
272+
"Suites" : [
273+
{ "Suite" : "stable", "Codename" : "stretch" },
274+
{ "Suite" : "unstable" }
275+
]
276+
}))
277+
print("\n" + str(repo))
278+
dumpQuerySuiteDescsResult(repo, "debian", "stable")
279+
dumpQuerySuiteDescsResult(repo, "debian", "stretch")
280+
dumpQuerySuiteDescsResult(repo, "debian", "unstable")
281+
dumpQuerySuiteDescsResult(repo, "debian", "sid")
282+
283+
267284

268285
def mergedict(a, b):
269286
res = dict(a)

0 commit comments

Comments
 (0)