Skip to content

Commit

Permalink
refactor: test_help_all function (#213)
Browse files Browse the repository at this point in the history
* refactor: test_help_all function

Signed-off-by: Shivay Lamba <shivaylamba@gmail.com>

* refactor: add doxstyle comment

Signed-off-by: Shivay Lamba <shivaylamba@gmail.com>

Signed-off-by: Shivay Lamba <shivaylamba@gmail.com>
  • Loading branch information
shivaylamba committed Dec 23, 2022
1 parent 3692589 commit 355d902
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
project = "FLINT.Cloud Technical Guide"

copyright = "2022, Moja Global"
author = u"Sneha Mishra, Arnav Tiwari & contributors"
author = "Sneha Mishra, Arnav Tiwari & contributors"


# -- General configuration ---------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions local/rest_api_gcbm/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def gcbm_dynamic():
# Sanitize title
title = "".join(c for c in title if c.isalnum())
input_dir = f"{os.getcwd()}/input/{title}"

try:
get_config_templates(input_dir)
get_modules_cbm_config(input_dir)
Expand Down Expand Up @@ -482,7 +482,8 @@ def gcbm_download():
}

return send_file(
f"{os.getcwd()}/output/{title}.zip", attachment_filename="{title}.zip",
f"{os.getcwd()}/output/{title}.zip",
attachment_filename="{title}.zip",
)


Expand Down
4 changes: 3 additions & 1 deletion local/tests/test_rest_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def test_help_all(self, base_endpoint):
help_all_endpoint = base_endpoint + "help/all"
help_all_response = requests.get(help_all_endpoint)
assert help_all_response.status_code == 200
"This test is to check the help endpoint with random i.e arg argument"

def test_help_arg(self, base_endpoint):
"""This test is to check the help endpoint with random i.e arg argument"""
random_arg = "arg"
help_random_endpoint = base_endpoint + "help/arg"
help_random_endpoint = requests.get(help_random_endpoint)
Expand Down

0 comments on commit 355d902

Please sign in to comment.