diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-03-04 15:13:15 -0800 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-03-04 15:13:15 -0800 |
| commit | a248c88372fa445c1159511fae2b98208f149f69 (patch) | |
| tree | fedb11cc7ff075c96baac5adf4be6903f11ac5f0 | |
| parent | 3e25c8ac69ae336102d91f1d2591ab03f3a91e33 (diff) | |
Fixed three small flake8 violations.
| -rw-r--r-- | django/db/migrations/state.py | 2 | ||||
| -rw-r--r-- | tests/migrations/test_operations.py | 1 | ||||
| -rw-r--r-- | tests/modeladmin/tests.py | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index 90226221be..ab2bd8e6d8 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -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( diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index debfc760b5..da55d7d7d1 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -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. diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 146c078e59..205e1dc8cf 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -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): |
