diff --git a/tools/test-backend b/tools/test-backend index e3ce1c4dae..15f82eaa05 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -238,9 +238,6 @@ def main() -> None: action="store_true", default=False, help="Show detailed output") - parser.add_argument('--generate-fixtures', action="store_true", default=False, - dest="generate_fixtures", - help=("Force a call to generate-fixtures.")) parser.add_argument('--report-slow-tests', dest='report_slow_tests', action="store_true", default=False, @@ -377,7 +374,7 @@ def main() -> None: # files, since part of setup is importing the models for all applications in INSTALLED_APPS. django.setup() - update_test_databases_if_required(options.generate_fixtures) + update_test_databases_if_required() subprocess.check_call(['tools/webpack', '--test']) diff --git a/zerver/lib/test_fixtures.py b/zerver/lib/test_fixtures.py index a216b31e9d..fa5b2c9f7e 100644 --- a/zerver/lib/test_fixtures.py +++ b/zerver/lib/test_fixtures.py @@ -202,8 +202,7 @@ TEST_DATABASE = Database( settings='zproject.test_settings', ) -def update_test_databases_if_required(use_force: bool=False, - rebuild_test_database: bool=False) -> None: +def update_test_databases_if_required(rebuild_test_database: bool=False) -> None: """Checks whether the zulip_test_template database template, is consistent with our database migrations; if not, it updates it in the fastest way possible: @@ -219,12 +218,10 @@ def update_test_databases_if_required(use_force: bool=False, The `rebuild_test_database` option (used by our Casper tests) asks us to drop and re-cloning the zulip_test database from the template so those test suites can run with a fresh copy. - - If use_force is specified, it will always do a full rebuild. """ test_template_db_status = TEST_DATABASE.template_status() - if use_force or test_template_db_status == 'needs_rebuild': + if test_template_db_status == 'needs_rebuild': run(['tools/rebuild-dev-database']) return