diff options
author | David Smith <39445562+smithdc1@users.noreply.github.com> | 2021-07-27 09:41:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 10:41:51 +0200 |
commit | 1cba3207867fb168788ad6120770d0398b6b2807 (patch) | |
tree | d5e345b7a46f90a3dc22b3d03949524d73ad197d /tests/schema | |
parent | 3d9040a50b160f8b4bb580e09f4120d4979fe29e (diff) | |
download | django-1cba3207867fb168788ad6120770d0398b6b2807.tar.gz |
Refs #32956 -- Changed "afterwards" to "afterward" in docs and comments.
This also removes unnecessary comments with the previous spelling.
AP Stylebook has a short entry to advise the preferred spelling for
"en-us". "Afterwards" is preferred in British English.
Diffstat (limited to 'tests/schema')
-rw-r--r-- | tests/schema/tests.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py index 0e88bfdbd1..95d4d7fb7a 100644 --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -520,7 +520,6 @@ class SchemaTests(TransactionTestCase): 'column': editor.quote_name(new_field.name), } self.assertFalse(any(drop_default_sql in query['sql'] for query in ctx.captured_queries)) - # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertEqual(columns['age'][0], connection.features.introspected_field_types['IntegerField']) self.assertTrue(columns['age'][1][6]) @@ -554,7 +553,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("surname") with connection.schema_editor() as editor: editor.add_field(Author, new_field) - # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertEqual(columns['surname'][0], connection.features.introspected_field_types['CharField']) self.assertEqual(columns['surname'][1][6], @@ -579,7 +577,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("awesome") with connection.schema_editor() as editor: editor.add_field(Author, new_field) - # Ensure the field is right afterwards columns = self.column_classes(Author) # BooleanField are stored as TINYINT(1) on MySQL. field_type = columns['awesome'][0] @@ -632,7 +629,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("bits") with connection.schema_editor() as editor: editor.add_field(Author, new_field) - # Ensure the field is right afterwards columns = self.column_classes(Author) # MySQL annoyingly uses the same backend, so it'll come back as one of # these two types. @@ -672,7 +668,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("name") with connection.schema_editor() as editor: editor.alter_field(Author, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertEqual(columns['name'][0], "TextField") self.assertTrue(columns['name'][1][6]) @@ -681,7 +676,6 @@ class SchemaTests(TransactionTestCase): new_field2.set_attributes_from_name("name") with connection.schema_editor() as editor: editor.alter_field(Author, new_field, new_field2, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertEqual(columns['name'][0], "TextField") self.assertEqual(bool(columns['name'][1][6]), bool(connection.features.interprets_empty_strings_as_nulls)) @@ -907,7 +901,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("height") with connection.schema_editor() as editor: editor.alter_field(Author, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertFalse(columns['height'][1][6]) # Verify default value @@ -1045,7 +1038,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("height") with connection.schema_editor() as editor: editor.alter_field(AuthorWithDefaultHeight, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(AuthorWithDefaultHeight) self.assertFalse(columns['height'][1][6]) @@ -1068,7 +1060,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("author") with connection.schema_editor() as editor: editor.alter_field(Book, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(Book) self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField']) self.assertForeignKeyExists(Book, 'author_id', 'schema_author') @@ -1130,7 +1121,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("author") with connection.schema_editor() as editor: editor.alter_field(BookWithO2O, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(Book) self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField']) # Ensure the field is not unique anymore @@ -1162,7 +1152,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("author") with connection.schema_editor() as editor: editor.alter_field(Book, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(BookWithO2O) self.assertEqual(columns['author_id'][0], connection.features.introspected_field_types['IntegerField']) # Ensure the field is unique now @@ -1523,7 +1512,6 @@ class SchemaTests(TransactionTestCase): new_field.set_attributes_from_name("display_name") with connection.schema_editor() as editor: editor.alter_field(Author, old_field, new_field, strict=True) - # Ensure the field is right afterwards columns = self.column_classes(Author) self.assertEqual(columns['display_name'][0], connection.features.introspected_field_types['CharField']) self.assertNotIn("name", columns) @@ -2603,7 +2591,6 @@ class SchemaTests(TransactionTestCase): # Alter the table with connection.schema_editor(atomic=connection.features.supports_atomic_references_rename) as editor: editor.alter_db_table(Author, "schema_author", "schema_otherauthor") - # Ensure the table is there afterwards Author._meta.db_table = "schema_otherauthor" columns = self.column_classes(Author) self.assertEqual(columns['name'][0], connection.features.introspected_field_types['CharField']) |