mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Removed unused local variables in tests.
This commit is contained in:
parent
5f52590368
commit
96d1d4e292
72 changed files with 309 additions and 339 deletions
|
@ -144,8 +144,8 @@ def m2m_compare(testcase, pk, klass, data):
|
|||
testcase.assertEqual(data, [obj.id for obj in instance.data.order_by('id')])
|
||||
|
||||
def im2m_compare(testcase, pk, klass, data):
|
||||
instance = klass.objects.get(id=pk)
|
||||
#actually nothing else to check, the instance just should exist
|
||||
klass.objects.get(id=pk)
|
||||
# actually nothing else to check, the instance just should exist
|
||||
|
||||
def im_compare(testcase, pk, klass, data):
|
||||
instance = klass.objects.get(id=pk)
|
||||
|
@ -478,7 +478,7 @@ def naturalKeySerializerTest(format, self):
|
|||
instance_count[klass] = klass.objects.count()
|
||||
|
||||
# use_natural_keys is deprecated and to be removed in Django 1.9
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
with warnings.catch_warnings(record=True):
|
||||
warnings.simplefilter("always")
|
||||
# Serialize the test database
|
||||
serialized_data = serializers.serialize(format, objects, indent=2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue