Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA256 | Date | |
|---|---|---|---|
| 0cc897e27e | |||
| ba782d466c | 
							
								
								
									
										28
									
								
								python-requests-mock-no-purl.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								python-requests-mock-no-purl.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
Index: requests-mock-1.12.1/tests/test_adapter.py
 | 
			
		||||
===================================================================
 | 
			
		||||
--- requests-mock-1.12.1.orig/tests/test_adapter.py
 | 
			
		||||
+++ requests-mock-1.12.1/tests/test_adapter.py
 | 
			
		||||
@@ -14,9 +14,14 @@ import http.client
 | 
			
		||||
 import io
 | 
			
		||||
 import json
 | 
			
		||||
 import re
 | 
			
		||||
+import unittest
 | 
			
		||||
 import urllib.parse
 | 
			
		||||
 
 | 
			
		||||
-import purl
 | 
			
		||||
+with_purl = True
 | 
			
		||||
+try:
 | 
			
		||||
+  import purl
 | 
			
		||||
+except:
 | 
			
		||||
+  with_purl = False
 | 
			
		||||
 import requests
 | 
			
		||||
 from urllib3 import HTTPResponse
 | 
			
		||||
 
 | 
			
		||||
@@ -345,6 +350,7 @@ class SessionAdapterTests(base.TestCase)
 | 
			
		||||
             resp = self.session.get(u)
 | 
			
		||||
             self.assertEqual('resp', resp.text)
 | 
			
		||||
 
 | 
			
		||||
+    @unittest.skipUnless(with_purl, "purl not available")
 | 
			
		||||
     def test_with_purl(self):
 | 
			
		||||
         self.adapter.register_uri('GET',
 | 
			
		||||
                                   purl.URL('mock://www.tester.com/a'),
 | 
			
		||||
@@ -1,3 +1,11 @@
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Tue Nov  5 13:07:00 UTC 2024 - pgajdos@suse.com
 | 
			
		||||
 | 
			
		||||
- do not require python-purl
 | 
			
		||||
- added patches
 | 
			
		||||
  fix https://github.com/jamielennox/requests-mock/issues/266
 | 
			
		||||
  + python-requests-mock-no-purl.patch
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Wed May  8 06:40:50 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,10 @@ Summary:        Module to mock out responses from the requests package
 | 
			
		||||
License:        Apache-2.0
 | 
			
		||||
URL:            https://github.com/jamielennox/requests-mock
 | 
			
		||||
Source:         https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
 | 
			
		||||
# https://github.com/jamielennox/requests-mock/issues/266
 | 
			
		||||
Patch0:         python-requests-mock-no-purl.patch
 | 
			
		||||
BuildRequires:  %{python_module fixtures}
 | 
			
		||||
BuildRequires:  %{python_module pip}
 | 
			
		||||
BuildRequires:  %{python_module purl}
 | 
			
		||||
BuildRequires:  %{python_module pytest}
 | 
			
		||||
BuildRequires:  %{python_module requests >= 2.3}
 | 
			
		||||
BuildRequires:  %{python_module requests-futures}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user