Skip to content

Commit

Permalink
scenarios: Update behave version and fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <xuanwo@yunify.com>
  • Loading branch information
Xuanwo committed Sep 28, 2017
1 parent 29c6ec2 commit 4e436b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scenarios/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
qingstor-sdk >= 2.0.2
assertpy >= 0.10
argparse >= 1.1
behave >= 1.2
git+https://github.com/behave/behave.git
sh >= 1.12
8 changes: 4 additions & 4 deletions scenarios/steps/rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ def step_impl(context):
bucket.put_object(row["name"])


@when(u'delete keys with prefix "中文目录测试"')
def step_impl(context):
@when(u'delete keys with prefix "{prefix}"')
def step_impl(context, prefix):
qsctl(
"rm",
"qs://{bucket}/{prefix}".format(
bucket=test_data['bucket_name'],
prefix=context.text,
prefix=prefix,
),
"-r",
).wait()
Expand All @@ -73,7 +73,7 @@ def step_impl(context):
def step_impl(context):
for row in context.table:
assert_that(bucket.head_object(row["name"]).status_code
).is_equal_to(404 if row["deleted"] is "1" else 200)
).is_equal_to(404 if row["deleted"] == "1" else 200)

for row in context.table:
bucket.delete_object(row["name"])

0 comments on commit 4e436b5

Please sign in to comment.