mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-05-28 20:00:49 +00:00
fix: do not prepend DJANGO settings info to all jobs
The DJANGO_SETTINGS_MODULE is far from being relevant in all containers.
This commit is contained in:
parent
478d44c299
commit
85d868423a
|
@ -37,10 +37,8 @@ class JobsTests(PluginsTestCase, TestCommandMixin):
|
|||
self.assertIsNone(result.exception)
|
||||
self.assertEqual(0, result.exit_code)
|
||||
self.assertIn("cms-job", dc_args)
|
||||
self.assertTrue(
|
||||
dc_args[-1]
|
||||
.strip()
|
||||
.startswith('echo "Loading settings $DJANGO_SETTINGS_MODULE"')
|
||||
self.assertIn(
|
||||
"git clone https://github.com/openedx/edx-demo-course", dc_args[-1]
|
||||
)
|
||||
|
||||
def test_set_theme(self) -> None:
|
||||
|
@ -65,10 +63,5 @@ class JobsTests(PluginsTestCase, TestCommandMixin):
|
|||
self.assertIsNone(result.exception)
|
||||
self.assertEqual(0, result.exit_code)
|
||||
self.assertIn("lms-job", dc_args)
|
||||
self.assertTrue(
|
||||
dc_args[-1]
|
||||
.strip()
|
||||
.startswith('echo "Loading settings $DJANGO_SETTINGS_MODULE"')
|
||||
)
|
||||
self.assertIn("assign_theme('beautiful', 'domain1')", dc_args[-1])
|
||||
self.assertIn("assign_theme('beautiful', 'domain2')", dc_args[-1])
|
||||
|
|
|
@ -264,11 +264,8 @@ def do_callback(service_commands: t.Iterable[t.Tuple[str, str]]) -> None:
|
|||
context = click.get_current_context().obj
|
||||
config = tutor_config.load(context.root)
|
||||
runner = context.job_runner(config)
|
||||
base_openedx_command = """
|
||||
echo "Loading settings $DJANGO_SETTINGS_MODULE"
|
||||
"""
|
||||
for service, command in service_commands:
|
||||
runner.run_task_from_str(service, base_openedx_command + command)
|
||||
runner.run_task_from_str(service, command)
|
||||
|
||||
|
||||
hooks.Filters.CLI_DO_COMMANDS.add_items(
|
||||
|
|
Loading…
Reference in New Issue
Block a user