diff options
author | Aleš Matěj <amatej@redhat.com> | 2021-04-27 15:49:23 +0300 |
---|---|---|
committer | Jaroslav Rohel <jrohel@redhat.com> | 2021-09-29 10:44:41 +0300 |
commit | dde3331b9b9919702dcb58776e7c4e1de0bc49a6 (patch) | |
tree | 38a7604321ec1e4d92d502921e10e825b7a2c42d | |
parent | 3a179cd7227f6a47c7c262db8e44540542f215cd (diff) |
Don't use SHA-1 and MD5 in the tests
-rw-r--r-- | tests/python/tests/test_checksum.py | 6 | ||||
-rw-r--r-- | tests/python/tests/test_updatecollection.py | 4 | ||||
-rw-r--r-- | tests/python/tests/test_updatecollectionpackage.py | 4 | ||||
-rw-r--r-- | tests/python/tests/test_updateinfo.py | 12 |
4 files changed, 10 insertions, 16 deletions
diff --git a/tests/python/tests/test_checksum.py b/tests/python/tests/test_checksum.py index dadf65a..f6a6318 100644 --- a/tests/python/tests/test_checksum.py +++ b/tests/python/tests/test_checksum.py @@ -9,9 +9,6 @@ from .fixtures import * class TestCaseChecksum(unittest.TestCase): def test_checksum_name_str(self): - self.assertEqual(cr.checksum_name_str(cr.MD5), "md5") - self.assertEqual(cr.checksum_name_str(cr.SHA), "sha") - self.assertEqual(cr.checksum_name_str(cr.SHA1), "sha1") self.assertEqual(cr.checksum_name_str(cr.SHA224), "sha224") self.assertEqual(cr.checksum_name_str(cr.SHA256), "sha256") self.assertEqual(cr.checksum_name_str(cr.SHA384), "sha384") @@ -25,9 +22,6 @@ class TestCaseChecksum(unittest.TestCase): self.assertEqual(cr.checksum_type("sHa256"), cr.SHA256) self.assertEqual(cr.checksum_type("ShA256"), cr.SHA256) - self.assertEqual(cr.checksum_type("md5"), cr.MD5) - self.assertEqual(cr.checksum_type("sha"), cr.SHA) - self.assertEqual(cr.checksum_type("sha1"), cr.SHA1) self.assertEqual(cr.checksum_type("sha224"), cr.SHA224) self.assertEqual(cr.checksum_type("sha256"), cr.SHA256) self.assertEqual(cr.checksum_type("sha384"), cr.SHA384) diff --git a/tests/python/tests/test_updatecollection.py b/tests/python/tests/test_updatecollection.py index 5d85d85..893f864 100644 --- a/tests/python/tests/test_updatecollection.py +++ b/tests/python/tests/test_updatecollection.py @@ -32,7 +32,7 @@ class TestCaseUpdateCollection(unittest.TestCase): pkg.src = "foo.src.rpm" pkg.filename = "foo.rpm" pkg.sum = "abcdef" - pkg.sum_type = cr.SHA1 + pkg.sum_type = cr.SHA256 pkg.reboot_suggested = True col.shortname = "short name" @@ -62,7 +62,7 @@ class TestCaseUpdateCollection(unittest.TestCase): self.assertEqual(pkg.src, "foo.src.rpm") self.assertEqual(pkg.filename, "foo.rpm") self.assertEqual(pkg.sum, "abcdef") - self.assertEqual(pkg.sum_type, cr.SHA1) + self.assertEqual(pkg.sum_type, cr.SHA256) self.assertEqual(pkg.reboot_suggested, True) def test_updatecollection_setters_when_module_going_out_of_scope(self): diff --git a/tests/python/tests/test_updatecollectionpackage.py b/tests/python/tests/test_updatecollectionpackage.py index 4c7d4ce..2dbb154 100644 --- a/tests/python/tests/test_updatecollectionpackage.py +++ b/tests/python/tests/test_updatecollectionpackage.py @@ -33,7 +33,7 @@ class TestCaseUpdateCollectionPackage(unittest.TestCase): pkg.src = "foo.src.rpm" pkg.filename = "foo.rpm" pkg.sum = "abcdef" - pkg.sum_type = cr.SHA1 + pkg.sum_type = cr.SHA256 pkg.reboot_suggested = True pkg.restart_suggested = True pkg.relogin_suggested = True @@ -46,7 +46,7 @@ class TestCaseUpdateCollectionPackage(unittest.TestCase): self.assertEqual(pkg.src, "foo.src.rpm") self.assertEqual(pkg.filename, "foo.rpm") self.assertEqual(pkg.sum, "abcdef") - self.assertEqual(pkg.sum_type, cr.SHA1) + self.assertEqual(pkg.sum_type, cr.SHA256) self.assertEqual(pkg.reboot_suggested, True) self.assertEqual(pkg.restart_suggested, True) self.assertEqual(pkg.relogin_suggested, True) diff --git a/tests/python/tests/test_updateinfo.py b/tests/python/tests/test_updateinfo.py index b85e1dc..77e6f4e 100644 --- a/tests/python/tests/test_updateinfo.py +++ b/tests/python/tests/test_updateinfo.py @@ -161,7 +161,7 @@ class TestCaseUpdateInfo(unittest.TestCase): pkg.src = "foo.src.rpm" pkg.filename = "foo.rpm" pkg.sum = "abcdef" - pkg.sum_type = cr.SHA1 + pkg.sum_type = cr.SHA256 pkg.reboot_suggested = True pkg.restart_suggested = True pkg.relogin_suggested = True @@ -226,7 +226,7 @@ class TestCaseUpdateInfo(unittest.TestCase): <module name="kangaroo" stream="0" version="18446744073709551615" context="deadbeef" arch="x86"/> <package name="foo" version="1.2" release="3" epoch="0" arch="x86" src="foo.src.rpm"> <filename>foo.rpm</filename> - <sum type="sha1">abcdef</sum> + <sum type="sha256">abcdef</sum> <reboot_suggested>True</reboot_suggested> <restart_suggested>True</restart_suggested> <relogin_suggested>True</relogin_suggested> @@ -252,7 +252,7 @@ class TestCaseUpdateInfo(unittest.TestCase): pkg.src = "foo.src.rpm" pkg.filename = "foo.rpm" pkg.sum = "abcdef" - pkg.sum_type = cr.SHA1 + pkg.sum_type = cr.SHA256 pkg.reboot_suggested = True # Collection without module @@ -314,7 +314,7 @@ class TestCaseUpdateInfo(unittest.TestCase): <name>long name</name> <package name="foo" version="1.2" release="3" epoch="0" arch="x86" src="foo.src.rpm"> <filename>foo.rpm</filename> - <sum type="sha1">abcdef</sum> + <sum type="sha256">abcdef</sum> <reboot_suggested>True</reboot_suggested> </package> </collection> @@ -344,7 +344,7 @@ class TestCaseUpdateInfo(unittest.TestCase): pkg.src = "foo.src.rpm" pkg.filename = "foo.rpm" pkg.sum = "abcdef" - pkg.sum_type = cr.SHA1 + pkg.sum_type = cr.SHA256 pkg.reboot_suggested = True pkg.restart_suggested = True pkg.relogin_suggested = True @@ -411,7 +411,7 @@ class TestCaseUpdateInfo(unittest.TestCase): <module version="18446744073709551615" context="deadbeef" arch="x86"/> <package name="foo" version="1.2" release="3" epoch="0" arch="x86" src="foo.src.rpm"> <filename>foo.rpm</filename> - <sum type="sha1">abcdef</sum> + <sum type="sha256">abcdef</sum> <reboot_suggested>True</reboot_suggested> <restart_suggested>True</restart_suggested> <relogin_suggested>True</relogin_suggested> |