Skip to content

Commit

Permalink
travis: Make python 2.6 happy
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Jan 20, 2017
1 parent bbf6b7b commit 966bf89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
20 changes: 8 additions & 12 deletions scenarios/steps/cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ def step_impl(context):
@when(u'copy to QingStor key')
def step_impl(context):
for row in context.table:
command = qsctl(
qsctl(
"cp",
"tmp/{filename}".format(filename=row["name"]),
"qs://{bucket}/{filename}".format(
bucket=test_data['bucket_name'], filename=row["name"]
)
)
command.wait()
).wait()


@then(u'QingStor should have key')
Expand All @@ -60,13 +59,12 @@ def step_impl(context):

@when(u'copy to QingStor keys recursively')
def step_impl(context):
command = qsctl(
qsctl(
"cp",
"tmp",
"qs://{bucket}".format(bucket=test_data['bucket_name']),
"-r"
)
command.wait()
).wait()


@then(u'QingStor should have keys')
Expand All @@ -81,14 +79,13 @@ def step_impl(context):
@when(u'copy to local file')
def step_impl(context):
for row in context.table:
command = qsctl(
qsctl(
"cp",
"qs://{bucket}/{filename}".format(
bucket=test_data['bucket_name'], filename=row["name"]
),
"tmp/{filename}".format(filename=row["name"]),
)
command.wait()
).wait()


@then(u'local should have file')
Expand All @@ -106,15 +103,14 @@ def step_impl(context):

@when(u'copy to local files recursively')
def step_impl(context):
command = qsctl(
qsctl(
"cp",
"qs://{bucket}".format(
bucket=test_data["bucket_name"],
),
"tmp",
"-r",
)
command.wait()
).wait()


@then(u'local should have files')
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def setUp(self):

def test_yaml_load(self):
with open(self.conf_file, 'r') as f:
self.assertIsInstance(yaml_load(f), dict)
self.assertEqual(isinstance(yaml_load(f), dict), True)

def test_load_conf_1(self):
load_conf("")
Expand All @@ -84,7 +84,7 @@ def test_load_conf_2(self):
load_conf(self.bad_conf_file)

def test_load_conf_3(self):
self.assertIsInstance(load_conf(self.conf_file), dict)
self.assertEqual(isinstance(load_conf(self.conf_file), dict), True)

def test_is_windows(self):
if platform.system().lower() == "windows":
Expand Down

0 comments on commit 966bf89

Please sign in to comment.