diff --git a/scenarios/requirements.txt b/scenarios/requirements.txt index e4de849c..c4ba5840 100644 --- a/scenarios/requirements.txt +++ b/scenarios/requirements.txt @@ -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 diff --git a/scenarios/steps/rm.py b/scenarios/steps/rm.py index 201141ba..ac2444a4 100644 --- a/scenarios/steps/rm.py +++ b/scenarios/steps/rm.py @@ -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() @@ -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"])