aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/rsa/py2/patches/01-fix-tests.patch
blob: a695e37f68135e084e335ae9d3e8fc68fd47fdd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- contrib/python/rsa/py2/tests/test_load_save_keys.py	(index)
+++ contrib/python/rsa/py2/tests/test_load_save_keys.py	(working tree)
@@ -185,9 +185,11 @@ class PemTest(unittest.TestCase):
         self.assertEqual(CLEAN_PUBLIC_PEM, pem)
 
     def test_load_from_disk(self):
+        from yatest.common import source_path
+
         """Test loading a PEM file from disk."""
 
-        fname = os.path.join(os.path.dirname(__file__), 'private.pem')
+        fname = source_path('contrib/python/rsa/py2/tests/private.pem')
         with open(fname, mode='rb') as privatefile:
             keydata = privatefile.read()
         privkey = rsa.key.PrivateKey.load_pkcs1(keydata)