diff options
author | Guido Günther <agx@sigxcpu.org> | 2020-12-21 10:56:12 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2020-12-21 11:47:25 +0100 |
commit | e085ab93f305f2e1287f7136bdfc2e4e2ffebc43 (patch) | |
tree | 38c19dfb324902e6e4c449ffd49e2c63b1fecc88 /tests | |
parent | 680e9ec6668cda096e03306bd638fd675cb29fb6 (diff) |
tests: Fixup changelog test on Ubuntu
The keys in os-release differ from lsb-release
Diffstat (limited to 'tests')
-rw-r--r-- | tests/doctests/test_Changelog.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/doctests/test_Changelog.py b/tests/doctests/test_Changelog.py index a1e43118..28138aeb 100644 --- a/tests/doctests/test_Changelog.py +++ b/tests/doctests/test_Changelog.py @@ -277,12 +277,12 @@ def test_add_section(): >>> cl = gbp.deb.changelog.ChangeLog(filename=testclname) >>> cl.add_section(msg=["Test add section"], distribution=None, author="Debian Maintainer", email="maint@debian.org") >>> cl = gbp.deb.changelog.ChangeLog(filename=testclname) - >>> version = '0.5.32ubuntu1' if os_release['DISTRIB_ID'] == 'Ubuntu' else '0.5.33' + >>> version = '0.5.32ubuntu1' if os_release['ID'] == 'ubuntu' else '0.5.33' >>> cl.version == version True >>> cl.debian_version == version True - >>> distributions = ['UNRELEASED', os_release['DISTRIB_CODENAME'] or 'unstable'] + >>> distributions = ['UNRELEASED', os_release['VERSION_CODENAME'] or 'unstable'] >>> cl['Distribution'] in distributions True >>> 'Test add section' in cl['Changes'] @@ -325,12 +325,12 @@ def test_add_entry(): >>> cl.add_section(msg=["Test add section"], distribution=None, author="Debian Maintainer", email="maint@debian.org") >>> cl.add_entry(msg=["Test add entry"], author="Debian Maintainer", email="maint@debian.org") >>> cl = gbp.deb.changelog.ChangeLog(filename=testclname) - >>> version = '0.5.32ubuntu1' if os_release['DISTRIB_ID'] == 'Ubuntu' else '0.5.33' + >>> version = '0.5.32ubuntu1' if os_release['ID'] == 'ubuntu' else '0.5.33' >>> cl.version == version True >>> cl.debian_version == version True - >>> distributions = ['UNRELEASED', os_release['DISTRIB_CODENAME'] or 'unstable'] + >>> distributions = ['UNRELEASED', os_release['VERSION_CODENAME'] or 'unstable'] >>> cl['Distribution'] in distributions True >>> 'Test add entry' in cl['Changes'] |