diff options
| author | Tim Graham <timograham@gmail.com> | 2016-06-28 11:21:26 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-07-01 09:58:56 -0400 |
| commit | 567cfc1601a5f475eea12bc5de53b849fa5dadea (patch) | |
| tree | c471ba1af748008e4fbe9faee8cf51d4dffcd263 /tests/queries/tests.py | |
| parent | 9c48e17480432b8723fcdcc262d8d62866e93a4f (diff) | |
[1.10.x] Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
Backport of c9ae09addffb839403312131d4251e9d8b454508 from master
Diffstat (limited to 'tests/queries/tests.py')
| -rw-r--r-- | tests/queries/tests.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py index e930d6d1cb..48b57376f9 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -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): |
