diff --git a/app/public/cantusdata/management/commands/index_manuscript_mei.py b/app/public/cantusdata/management/commands/index_manuscript_mei.py index 48752779..202ccf0f 100644 --- a/app/public/cantusdata/management/commands/index_manuscript_mei.py +++ b/app/public/cantusdata/management/commands/index_manuscript_mei.py @@ -58,20 +58,9 @@ def add_arguments(self, parser: CommandParser) -> None: "documents for the specified manuscript before indexing the new data." ), ) - parser.add_argument( - "--test-core", - action="store_true", - help=( - "Use the test core for indexing. Used when running unittests on this" - "command. Defaults to False." - ), - ) def handle(self, *args: Any, **options: Any) -> None: - if options["test_core"]: - solr_conn = SolrConnection(settings.SOLR_TEST_SERVER) - else: - solr_conn = SolrConnection(settings.SOLR_SERVER) + solr_conn = SolrConnection(settings.SOLR_SERVER) manuscript_id = options["manuscript_id"][0] if options.get("flush_index"): self.flush_manuscript_ngrams_from_index(solr_conn, manuscript_id) diff --git a/app/public/cantusdata/test/core/management/commands/test_index_manuscript_mei.py b/app/public/cantusdata/test/core/management/commands/test_index_manuscript_mei.py index 8d5aaa41..f82d2fb6 100644 --- a/app/public/cantusdata/test/core/management/commands/test_index_manuscript_mei.py +++ b/app/public/cantusdata/test/core/management/commands/test_index_manuscript_mei.py @@ -34,7 +34,6 @@ def test_index_manuscript_mei(self) -> None: "5", "--mei-dir", TEST_MEI_FILES_PATH, - "--test-core", ) results = self.solr_conn.query("*:*", fq="type:omr_ngram") with self.subTest("Test total number of indexed documents"): @@ -54,16 +53,12 @@ def test_flush_option(self) -> None: "123723", "--mei-dir", TEST_MEI_FILES_PATH, - "--test-core", ) - with self.subTest("Check index is not empty before test"): results = self.solr_conn.query("*:*", fq="type:omr_ngram") self.assertGreater(len(results), 0) with self.subTest("Test flush option"): - call_command( - "index_manuscript_mei", "123723", "--flush-index", "--test-core" - ) + call_command("index_manuscript_mei", "123723", "--flush-index") results = self.solr_conn.query("*:*", fq="type:omr_ngram") self.assertEqual(len(results), 0)