Update the test for the creating source feature to add arguments.

This commit is contained in:
2023-11-09 22:06:17 +02:00
parent befdc9ea93
commit d3bc4bd5a2
2 changed files with 14 additions and 5 deletions
+9 -1
View File
@@ -12,6 +12,13 @@ def given_source_label(context, label):
def given_source_path(context, source_path):
context.source_path = source_path
@given('the arguments "{arguments}"')
def given_source_arguments(context, arguments):
context.args = arguments
if arguments == "<empty>":
context.args = ""
@when('I add the source')
def add_source(context):
try:
@@ -19,7 +26,7 @@ def add_source(context):
context.label,
context.source_path,
[],
"",
context.args,
)
except IntegrityError:
context.exception_raised = True
@@ -32,4 +39,5 @@ def path_has_added(context):
assert context.source.label == context.label
assert context.source.source.path == context.source_path
assert context.source.args.command == context.args