| |
@@ -28,7 +28,7 @@
|
| |
'old_rpms': ['Dummy-firefox'],
|
| |
'common_rpms': ['Dummy-firefox'],
|
| |
'rpms': ['Dummy-firefox'],
|
| |
- 'changelog': [u'* Tue Mar 15 2016 Lubomír Sedlář <lubomir.sedlar@gmail.com> - 1:0.1.0-1\n- new version'],
|
| |
+ 'changelog': ['* Tue Mar 15 2016 Lubomír Sedlář <lubomir.sedlar@gmail.com> - 1:0.1.0-1\n- new version'],
|
| |
'added_rpms': [],
|
| |
'dropped_rpms': [],
|
| |
'nvr': 'Dummy-firefox-1:0.1.0-1',
|
| |
@@ -60,7 +60,7 @@
|
| |
'old_rpms': ['cloud-init'],
|
| |
'common_rpms': ['cloud-init'],
|
| |
'rpms': ['cloud-init'],
|
| |
- 'changelog': [u'* Tue Sep 05 2017 Lubomír Sedlář <lsedlar@redhat.com> - 0.7.9-9.module_f8c7dcdc\n- First release'],
|
| |
+ 'changelog': ['* Tue Sep 05 2017 Lubomír Sedlář <lsedlar@redhat.com> - 0.7.9-9.module_f8c7dcdc\n- First release'],
|
| |
'added_rpms': [],
|
| |
'dropped_rpms': [],
|
| |
'nvr': 'cloud-init-0.7.9-9.module_f8c7dcdc',
|
| |
@@ -227,26 +227,26 @@
|
| |
|
| |
class TestCompareChangelogs(unittest.TestCase):
|
| |
def test_select_new(self):
|
| |
- c1 = ChangelogEntry(b'John Doe <jdoe@example.com> 1.0-1', 1000000, 'change 1')
|
| |
- c2 = ChangelogEntry(b'John Doe <jdoe@example.com> 1.1-1', 2000000, 'change 2')
|
| |
+ c1 = ChangelogEntry('John Doe <jdoe@example.com> 1.0-1', 1000000, 'change 1')
|
| |
+ c2 = ChangelogEntry('John Doe <jdoe@example.com> 1.1-1', 2000000, 'change 2')
|
| |
old = mock.Mock(changelogs=[c1])
|
| |
new = mock.Mock(changelogs=[c2, c1])
|
| |
clog = get_changelog_diff_from_headers(old, new)
|
| |
self.assertEqual(clog, [c2])
|
| |
|
| |
def test_select_with_same_date(self):
|
| |
- c1 = ChangelogEntry(b'John Doe <jdoe@example.com> 1.0-1', 1000000, 'change 1')
|
| |
- c2 = ChangelogEntry(b'John Doe <jdoe@example.com> 1.1-1', 1000000, 'change 2')
|
| |
+ c1 = ChangelogEntry('John Doe <jdoe@example.com> 1.0-1', 1000000, 'change 1')
|
| |
+ c2 = ChangelogEntry('John Doe <jdoe@example.com> 1.1-1', 1000000, 'change 2')
|
| |
old = mock.Mock(changelogs=[c1])
|
| |
new = mock.Mock(changelogs=[c2, c1])
|
| |
clog = get_changelog_diff_from_headers(old, new)
|
| |
self.assertEqual(clog, [c2])
|
| |
|
| |
def test_no_subset(self):
|
| |
- c1 = ChangelogEntry(b'John Doe <jdoe@example.com> 0:2.0-1', 1000000, 'change 1')
|
| |
- c2 = ChangelogEntry(b'John Doe <jdoe@example.com> 1:1.1-1', 1000000, 'change 2')
|
| |
- c3 = ChangelogEntry(b'John Doe <jdoe@example.com> 1:1.2-1', 1000000, 'change 3')
|
| |
- c4 = ChangelogEntry(b'John Doe <jdoe@example.com> 1:1.3-1', 1000000, 'change 4')
|
| |
+ c1 = ChangelogEntry('John Doe <jdoe@example.com> 0:2.0-1', 1000000, 'change 1')
|
| |
+ c2 = ChangelogEntry('John Doe <jdoe@example.com> 1:1.1-1', 1000000, 'change 2')
|
| |
+ c3 = ChangelogEntry('John Doe <jdoe@example.com> 1:1.2-1', 1000000, 'change 3')
|
| |
+ c4 = ChangelogEntry('John Doe <jdoe@example.com> 1:1.3-1', 1000000, 'change 4')
|
| |
old = mock.Mock(changelogs=[c3, c1])
|
| |
new = mock.Mock(changelogs=[c4, c2, c1])
|
| |
clog = get_changelog_diff_from_headers(old, new)
|
| |
python < 4.14.2 returned bytes, but that is now changed to return decoded strings.
Once Kobo is updated to work with newer RPM, these changes are still needed to get the test suite passing.
The tests are expected to fail until the kobo patch is merged and released.
Relates: https://bugzilla.redhat.com/show_bug.cgi?id=1713107
Relates: https://github.com/release-engineering/kobo/pull/115