python3.pkgs.python3-saml: fix more expired tests

Upstream has now fixed the tests we were previously disabling
ourselves, but in the meantime yet another test has started failing.
This commit is contained in:
Alyssa Ross
2023-10-05 18:25:01 +00:00
parent b8d473b6d2
commit 55ebc46e4b
2 changed files with 12 additions and 31 deletions

View File

@@ -24,14 +24,23 @@ buildPythonPackage rec {
};
patches = [
# skip tests with expired test data
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/bd65578e5a21494c89320094c61c1c77250bea33.diff";
hash = "sha256-9Trew6R5JDjtc0NRGoklqMVDEI4IEqFOdK3ezyBU6gI=";
})
# skip tests with expired test data
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
./skip-broken-tests.patch
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/ea3a6d4ee6ea0c5cfb0f698d8c0ed25638150f47.patch";
hash = "sha256-Q9+GM+mCEZK0QVp7ulH2hORVig2411OvkC4+o36DeXg=";
})
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/feb0d1d954ee4d0ad1ad1d7d536bf9e83fa9431b.patch";
hash = "sha256-NURGI4FUnFlWRZfkioU9IYmZ+Zk9FKfZchjdn7N9abU=";
})
];
propagatedBuildInputs = [

View File

@@ -1,28 +0,0 @@
diff --git a/tests/src/OneLogin/saml2_tests/response_test.py b/tests/src/OneLogin/saml2_tests/response_test.py
index fbe714f..bbed3c2 100644
--- a/tests/src/OneLogin/saml2_tests/response_test.py
+++ b/tests/src/OneLogin/saml2_tests/response_test.py
@@ -562,6 +562,7 @@ class OneLogin_Saml2_Response_Test(unittest.TestCase):
response_2 = OneLogin_Saml2_Response(settings, xml_2)
self.assertTrue(response_2.check_one_condition())
+ @unittest.skip("test data expired")
def testCheckOneAuthnStatement(self):
"""
Tests the check_one_authnstatement method of SamlResponse
@@ -970,6 +971,7 @@ class OneLogin_Saml2_Response_Test(unittest.TestCase):
with self.assertRaisesRegex(Exception, 'Could not validate timestamp: expired. Check system clock.'):
response_2.is_valid(self.get_request_data(), raise_exceptions=True)
+ @unittest.skip("test data expired")
def testIsInValidNoStatement(self):
"""
Tests the is_valid method of the OneLogin_Saml2_Response
@@ -1080,6 +1082,7 @@ class OneLogin_Saml2_Response_Test(unittest.TestCase):
with self.assertRaisesRegex(Exception, 'Found an Attribute element with duplicated Name'):
response.get_attributes()
+ @unittest.skip("test data expired")
def testIsInValidDestination(self):
"""
Tests the is_valid method of the OneLogin_Saml2_Response class