mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed some testfailures on jenkins.
Depending on the order of the tests beeing run, 10 can be a valid pk, 0 can never be a valid pk and as such we will get the wanted ValidationError.
This commit is contained in:
		| @@ -1344,11 +1344,11 @@ class OldFormForXTests(TestCase): | ||||
|         self.assertIsInstance(f.clean([]), EmptyQuerySet) | ||||
|         self.assertIsInstance(f.clean(()), EmptyQuerySet) | ||||
|         with self.assertRaises(ValidationError): | ||||
|             f.clean(['10']) | ||||
|             f.clean(['0']) | ||||
|         with self.assertRaises(ValidationError): | ||||
|             f.clean([str(c3.id), '10']) | ||||
|             f.clean([str(c3.id), '0']) | ||||
|         with self.assertRaises(ValidationError): | ||||
|             f.clean([str(c1.id), '10']) | ||||
|             f.clean([str(c1.id), '0']) | ||||
|  | ||||
|         # queryset can be changed after the field is created. | ||||
|         f.queryset = Category.objects.exclude(name='Fourth') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user