Skip to content

Commit fab0326

Browse files
committed
Avoid interactive prompts during unit tests
Always call `initial_setup` with `-f` option to avoid the "Do you want to proceed?" interactive prompt.
1 parent ce7c8e1 commit fab0326

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/coldfront_plugin_cloud/tests/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TestBase(TestCase):
3131
def setUp(self) -> None:
3232
# Otherwise output goes to the terminal for every test that is run
3333
backup, sys.stdout = sys.stdout, open(devnull, 'a')
34-
call_command('initial_setup', )
34+
call_command('initial_setup', '-f')
3535
call_command('load_test_data')
3636
call_command('register_cloud_attributes')
3737
sys.stdout = backup

src/coldfront_plugin_cloud/tests/unit/test_attribute_migration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TestAttributeMigration(base.TestBase):
1616
def setUp(self) -> None:
1717
# Run initial setup but do not register the attributes
1818
backup, sys.stdout = sys.stdout, open(devnull, 'a')
19-
call_command('initial_setup', )
19+
call_command('initial_setup', '-f')
2020
call_command('load_test_data')
2121
sys.stdout = backup
2222

0 commit comments

Comments
 (0)