Skip to content

Commit

Permalink
Fixes new lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Sep 18, 2023
1 parent d42d72f commit 7151cb5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/cli/test_cli_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def test_asset_search(runner, asset_id):
result = runner.invoke(app, ['asset', asset_id])
assert result.exit_code == 0
asset = loads(result.output)
assert type(asset) is dict
assert isinstance(asset, dict)
assert asset['id'] == asset_id
4 changes: 2 additions & 2 deletions tests/cli/test_cli_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_empty_search(runner, config):
)
assert result.exit_code == 0
output = loads(result.output)
assert type(output) is list
assert isinstance(output, list)
assert not output


Expand All @@ -35,7 +35,7 @@ def test_guid_search(runner, config, guid):
)
assert result.exit_code == 0
output = loads(result.output)
assert type(output) is list
assert isinstance(output, list)
assert len(output) == 1
assert guid in output[0]['name']
assert len(output) == 1
Expand Down
14 changes: 7 additions & 7 deletions tests/test_sonyci.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@ def test_token(ci: SonyCi):
@mark.vcr()
def test_workspaces(ci: SonyCi):
workspaces = ci.workspaces()
assert type(workspaces) == list, 'workspaces is not a list'
assert isinstance(workspaces, list), 'workspaces is not a list'
assert len(workspaces) > 0, 'no workspaces found'


@mark.vcr()
def test_workspace(ci: SonyCi):
workspace = ci.workspace()
assert type(workspace) == dict, 'workspace is not a dict'
assert isinstance(workspace, dict), 'workspace is not a dict'
assert 'id' in workspace, 'workspace has no id'


@mark.vcr()
def test_workspace_contents(ci: SonyCi):
result = ci.workspace_contents()
assert type(result) is list
assert isinstance(result, list)
assert result


@mark.vcr()
def test_workspace_empty_search(ci: SonyCi):
result = ci.workspace_search(query='i am not a guid')
assert type(result) is list
assert isinstance(result, list)
assert not result


@mark.vcr()
def test_workspace_search(ci: SonyCi, guid: str):
assets = ci.workspace_search(guid)
assert type(assets) is list
assert isinstance(assets, list)
assert len(assets) == 1

assert guid in assets[0]['name']
Expand All @@ -62,12 +62,12 @@ def test_workspace_search(ci: SonyCi, guid: str):
@mark.vcr()
def test_asset(ci: SonyCi, asset_id, **kwargs):
asset = ci.asset(asset_id)
assert type(asset) is dict
assert isinstance(asset, dict)
assert asset['id'] == asset_id


@mark.vcr()
def test_asset_download(ci: SonyCi, asset_id, **kwargs):
asset = ci.asset_download(asset_id)
assert type(asset) is dict
assert isinstance(asset, dict)
assert asset['id'] == asset_id

0 comments on commit 7151cb5

Please sign in to comment.