From 8c94a8e8a24efc0a319ab4a63dba497cc875f4c73aabb27ae5bf3027e388c5ea Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Nov 2024 11:10:17 +0000 Subject: [PATCH 1/2] ok OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-certifi?expand=0&rev=78 --- two-basic-unit-tests.patch | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/two-basic-unit-tests.patch b/two-basic-unit-tests.patch index 3e33f60..b39bc06 100644 --- a/two-basic-unit-tests.patch +++ b/two-basic-unit-tests.patch @@ -11,18 +11,14 @@ Subject: [PATCH 1/2] add 2 basic unit tests create mode 100644 certifi/tests/__init__.py create mode 100755 certifi/tests/test_certifi.py -Index: certifi-2024.7.4/certifi/tests/__init__.py -=================================================================== --- /dev/null -+++ certifi-2024.7.4/certifi/tests/__init__.py ++++ b/certifi/tests/__init__.py @@ -0,0 +1,2 @@ +# certifi.tests module + -Index: certifi-2024.7.4/certifi/tests/test_certifi.py -=================================================================== --- /dev/null -+++ certifi-2024.7.4/certifi/tests/test_certifi.py -@@ -0,0 +1,23 @@ ++++ b/certifi/tests/test_certifi.py +@@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +""" +unit tests to make sure everything behaves as expected @@ -35,21 +31,15 @@ Index: certifi-2024.7.4/certifi/tests/test_certifi.py + + +class TestCertifi(unittest.TestCase): -+ def test_cabundle_exists(self) -> None: -+ assert os.path.exists(certifi.where()) ++ def test_cabundle_exists(self): ++ """Check that the reported bundle exists""" ++ self.assertTrue(os.path.exists(certifi.where())) + -+ def test_read_contents(self) -> None: -+ content = certifi.contents() -+ assert "-----BEGIN CERTIFICATE-----" in content -+ -+ def test_py_typed_exists(self) -> None: -+ assert os.path.exists( -+ os.path.join(os.path.dirname(certifi.__file__), 'py.typed') -+ ) -Index: certifi-2024.7.4/.github/workflows/python-package.yml -=================================================================== ++ def test_read_contents(self): ++ """Check that the returned contents contain a certificate""" ++ self.assertIn("-----BEGIN CERTIFICATE-----", certifi.contents()) --- /dev/null -+++ certifi-2024.7.4/.github/workflows/python-package.yml ++++ b/.github/workflows/python-package.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions From e8e0e6676512c45e86fd924f895f40618e90425581df7a4bf67d205a9f0869c5 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 7 Nov 2024 09:18:57 +0000 Subject: [PATCH 2/2] - Make the test suite working just with the standard library. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-certifi?expand=0&rev=79 --- python-certifi.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-certifi.changes b/python-certifi.changes index ceaf015..648cc1e 100644 --- a/python-certifi.changes +++ b/python-certifi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 7 09:18:40 UTC 2024 - Matej Cepl + +- Make the test suite working just with the standard library. + ------------------------------------------------------------------- Wed Oct 9 06:43:31 UTC 2024 - Dirk Müller