mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 16:07:38 +03:00 
			
		
		
		
	test_requests TestSecure: skip tests for django versions where the secure
argument is not available
This commit is contained in:
		
							parent
							
								
									06c61fc511
								
							
						
					
					
						commit
						aa1ad4fb64
					
				|  | @ -24,6 +24,8 @@ from rest_framework.test import APIRequestFactory, APIClient | ||||||
| from rest_framework.views import APIView | from rest_framework.views import APIView | ||||||
| from io import BytesIO | from io import BytesIO | ||||||
| import json | import json | ||||||
|  | import django | ||||||
|  | import pytest | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| factory = APIRequestFactory() | factory = APIRequestFactory() | ||||||
|  | @ -277,6 +279,8 @@ class TestAuthSetter(TestCase): | ||||||
|         self.assertEqual(request.auth, 'DUMMY') |         self.assertEqual(request.auth, 'DUMMY') | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @pytest.mark.skipif(django.VERSION < (1, 7), | ||||||
|  |                     reason='secure argument is only available for django1.7+') | ||||||
| class TestSecure(TestCase): | class TestSecure(TestCase): | ||||||
| 
 | 
 | ||||||
|     def test_default_secure_false(self): |     def test_default_secure_false(self): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user