Skip to content

Commit ac07863

Browse files
committed
Simplify with
1 parent cbbe2fb commit ac07863

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/indexes_/test_atlas_indexes.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,9 @@ def test_field_not_exists(self):
8484
name="recent_article_idx",
8585
fields=["headline", "non_existing_name"],
8686
)
87-
with connection.schema_editor() as editor:
88-
msg = "Article has no field named 'non_existing_name'"
89-
with self.assertRaisesMessage(
90-
FieldDoesNotExist, msg
91-
), connection.schema_editor() as editor:
92-
editor.add_index(index=index, model=Article)
87+
msg = "Article has no field named 'non_existing_name'"
88+
with self.assertRaisesMessage(FieldDoesNotExist, msg), connection.schema_editor() as editor:
89+
editor.add_index(index=index, model=Article)
9390

9491

9592
class VectorSearchIndexTests(TestCase):

0 commit comments

Comments
 (0)