mirror of https://github.com/django/django.git
Fixed three small flake8 violations.
This commit is contained in:
parent
3e25c8ac69
commit
a248c88372
|
@ -166,7 +166,7 @@ class ModelState(object):
|
|||
# __bases__ we may end up with duplicates and ordering issues, we
|
||||
# therefore discard any duplicates and reorder the bases according
|
||||
# to their index in the MRO.
|
||||
flattened_bases = sorted(set(flatten_bases(model)), key=lambda x:model.__mro__.index(x))
|
||||
flattened_bases = sorted(set(flatten_bases(model)), key=lambda x: model.__mro__.index(x))
|
||||
|
||||
# Make our record
|
||||
bases = tuple(
|
||||
|
|
|
@ -582,6 +582,7 @@ class OperationTests(MigrationTestBase):
|
|||
self.assertEqual(project_state.render().get_model("test_runpython", "Pony").objects.count(), 6)
|
||||
self.assertEqual(project_state.render().get_model("test_runpython", "ShetlandPony").objects.count(), 2)
|
||||
|
||||
|
||||
class MigrateNothingRouter(object):
|
||||
"""
|
||||
A router that sends all writes to the other database.
|
||||
|
|
|
@ -867,8 +867,8 @@ class RadioFieldsCheckTests(CheckTestCase):
|
|||
|
||||
self.assertIsInvalid(
|
||||
ValidationTestModelAdmin, ValidationTestModel,
|
||||
("The value of 'radio_fields' refers to 'name', which is not an instance "
|
||||
"of ForeignKey, and does not have a 'choices' definition."),
|
||||
("The value of 'radio_fields' refers to 'name', which is not an instance "
|
||||
"of ForeignKey, and does not have a 'choices' definition."),
|
||||
'admin.E023')
|
||||
|
||||
def test_invalid_value(self):
|
||||
|
|
Loading…
Reference in New Issue