|
1 | | -from django.core.exceptions import FieldDoesNotExist |
2 | 1 | from django.db import connection |
3 | 2 | from django.test import TestCase |
4 | 3 |
|
@@ -79,15 +78,6 @@ def test_multiple_fields(self): |
79 | 78 | self.assertEqual(index_info[index.name]["options"], expected_options) |
80 | 79 | self.assertAddRemoveIndex(editor, Article, index) |
81 | 80 |
|
82 | | - def test_field_not_exists(self): |
83 | | - index = SearchIndex( |
84 | | - name="recent_article_idx", |
85 | | - fields=["headline", "non_existing_name"], |
86 | | - ) |
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) |
90 | | - |
91 | 81 |
|
92 | 82 | class VectorSearchIndexTests(TestCase): |
93 | 83 | # Tests for creating, validating, and removing vector search indexes |
@@ -176,15 +166,6 @@ def test_multiple_fields(self): |
176 | 166 | self.assertEqual(index_info[index.name]["options"], expected_options) |
177 | 167 | self.assertAddRemoveIndex(editor, Article, index) |
178 | 168 |
|
179 | | - def test_field_not_exists(self): |
180 | | - index = VectorSearchIndex( |
181 | | - name="recent_article_idx", |
182 | | - fields=["headline", "non_existing_name", "title_embedded"], |
183 | | - ) |
184 | | - msg = "Article has no field named 'non_existing_name'" |
185 | | - with self.assertRaisesMessage(FieldDoesNotExist, msg), connection.schema_editor() as editor: |
186 | | - editor.add_index(index=index, model=Article) |
187 | | - |
188 | 169 | def test_field_size_required(self): |
189 | 170 | index = VectorSearchIndex( |
190 | 171 | name="recent_article_idx", |
|
0 commit comments