mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.10.x] Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
Backport of c9ae09addf from master
			
			
This commit is contained in:
		| @@ -2621,14 +2621,10 @@ class UnionTests(unittest.TestCase): | ||||
|  | ||||
| class DefaultValuesInsertTest(TestCase): | ||||
|     def test_no_extra_params(self): | ||||
|         # Ticket #17056 -- affects Oracle | ||||
|         try: | ||||
|             DumbCategory.objects.create() | ||||
|         except TypeError: | ||||
|             self.fail( | ||||
|                 "Creation of an instance of a model with only the PK field " | ||||
|                 "shouldn't error out after bulk insert refactoring (#17056)" | ||||
|             ) | ||||
|         """ | ||||
|         Can create an instance of a model with only the PK field (#17056)." | ||||
|         """ | ||||
|         DumbCategory.objects.create() | ||||
|  | ||||
|  | ||||
| class ExcludeTests(TestCase): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user