diff --git a/osf_tests/test_elastic_search.py b/osf_tests/test_elastic_search.py index ade460051fe..5ec4e1df4ae 100644 --- a/osf_tests/test_elastic_search.py +++ b/osf_tests/test_elastic_search.py @@ -1307,7 +1307,7 @@ def tearDownClass(cls): def setUp(self): super(TestSearchMigration, self).setUp() - populate_institutions('test') + populate_institutions(default_args=True) self.es = search.search_engine.CLIENT search.delete_index(settings.ELASTIC_INDEX) search.create_index(settings.ELASTIC_INDEX) diff --git a/scripts/populate_institutions.py b/scripts/populate_institutions.py index a0a81c3ccdc..d1482cb6e49 100644 --- a/scripts/populate_institutions.py +++ b/scripts/populate_institutions.py @@ -54,9 +54,13 @@ def update_or_create(inst_data): return inst, True -def main(): +def main(default_args=False): + + if default_args: + args = parser.parse_args(['--env', 'test', '--all']) + else: + args = parser.parse_args() - args = parser.parse_args() server_env = args.env update_ids = args.ids update_all = args.all @@ -1661,4 +1665,4 @@ def main(): if __name__ == '__main__': - main() + main(default_args=False)