tests: add default for opts.kernel_cmdline
Ensure correct behavior in tests when kernel_cmdline is not set correctly. Also add to the the schema cmd submodules make_app function so that it doesn't crash when trying to read from the kernel_cmdline in the ubuntu drivers.
This commit is contained in:
parent
2f92ddee53
commit
410b7326fa
|
@ -54,6 +54,7 @@ def make_schema(app):
|
|||
def make_app():
|
||||
parser = make_server_args_parser()
|
||||
opts, unknown = parser.parse_known_args(["--dry-run"])
|
||||
opts.kernel_cmdline = {}
|
||||
app = SubiquityServer(opts, "")
|
||||
# This is needed because the ubuntu-pro server controller accesses dr_cfg
|
||||
# in the initializer.
|
||||
|
|
|
@ -45,6 +45,7 @@ def make_app(model=None):
|
|||
app.prev_screen = mock.Mock()
|
||||
app.hub = MessageHub()
|
||||
app.opts = mock.Mock()
|
||||
app.opts.kernel_cmdline = {}
|
||||
app.opts.dry_run = True
|
||||
app.scale_factor = 1000
|
||||
app.echo_syslog_id = None
|
||||
|
|
Loading…
Reference in New Issue