Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/rkls_github_canned_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def github_plugin_tree_api(github_user, github_repo, plugin_name):
"tree": []
}
# FIXME: Pull contents from directory
for file in os.listdir(f'tests/data/recklessrepo/{github_user}/{plugin_name}'):
base_path = 'tests/data/recklessrepo'
user_path = os.path.normpath(os.path.join(base_path, github_user, plugin_name))
if not user_path.startswith(base_path):
raise Exception("Invalid path")
for file in os.listdir(user_path):
dir_json["tree"].append({"path": file})
resp = flask.Response(response=json.dumps(dir_json),
headers={'Content-Type': 'application/json; charset=utf-8'})
Expand Down
Loading