mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".
This commit is contained in:
committed by
Mariusz Felisiak
parent
1ff0ea6e9b
commit
2231429991
@@ -43,6 +43,16 @@ class TestTestCase(TestCase):
|
||||
with self.assertRaisesMessage(AssertionError, message):
|
||||
Car.objects.using('other').get()
|
||||
|
||||
def test_reset_sequences(self):
|
||||
old_reset_sequences = self.reset_sequences
|
||||
self.reset_sequences = True
|
||||
msg = 'reset_sequences cannot be used on TestCase instances'
|
||||
try:
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
self._fixture_setup()
|
||||
finally:
|
||||
self.reset_sequences = old_reset_sequences
|
||||
|
||||
|
||||
class NonDeepCopyAble:
|
||||
def __deepcopy__(self, memo):
|
||||
|
||||
Reference in New Issue
Block a user