Conversation
Pull Request Test Coverage Report for Build 170
💛 - Coveralls |
6776349 to
2be6247
Compare
|
@isht3 Please resolve the conflicts here. |
2be6247 to
04a0e7b
Compare
|
@isht3 More conflicts 😄 |
evalai/utils/challenges.py
Outdated
| challenge = "{}{}{}{}".format(title, description, end_date, br) | ||
| cleaned_desc = BeautifulSoup(challenge["short_description"], "lxml").text | ||
| description = "{}\n".format(cleaned_desc) | ||
| date = "End Date : {}".format(style(challenge["end_date"].split("T")[0], fg="red")) |
evalai/utils/challenges.py
Outdated
| echo("Sorry, no challenges found!") | ||
|
|
||
|
|
||
| def pretty_print_challenge_phases(phases): |
There was a problem hiding this comment.
pretty_print_all_challenge_phases
evalai/utils/challenges.py
Outdated
| phase_id = "Phase ID: {}\n\n".format(style(str(phase["id"]), | ||
| bold=True, fg="blue")) | ||
|
|
||
| title = "{} {} {}".format(phase_title, challenge_id, phase_id) |
evalai/utils/challenges.py
Outdated
| echo(err) | ||
| sys.exit(1) | ||
|
|
||
| response_json = response.json() |
There was a problem hiding this comment.
response_json -> response
evalai/utils/challenges.py
Outdated
| pretty_print_challenge_phases(phases) | ||
|
|
||
|
|
||
| def pretty_print_challenge_phase(phase): |
There was a problem hiding this comment.
pretty_print_challenge_phase_data
evalai/utils/challenges.py
Outdated
| is_active = style("\nActive : {}\n".format(phase["is_active"]), bold=True) | ||
| is_public = style("\nPublic : {}\n".format(phase["is_public"]), bold=True) | ||
|
|
||
| phase = "{}{}{}{}{}{}{}{}{}{}".format(title, description, start_date, |
There was a problem hiding this comment.
phase -> challenge_phase
7f12a52 to
c85a581
Compare
|
@RishabhJain2018 Made changes! :D |
evalai/utils/challenges.py
Outdated
| cleaned_desc = BeautifulSoup(challenge["short_description"], "lxml").text | ||
| description = "{}\n".format(cleaned_desc) | ||
| end_date = "End Date : {}".format(style(challenge["end_date"].split("T")[0], fg="red")) | ||
| date = "\n{}\n\n".format(style(end_date, bold=True)) |
There was a problem hiding this comment.
@isht3 I think you missed this one date -> end_date
evalai/utils/challenges.py
Outdated
| description = "{}\n".format(cleaned_desc) | ||
| end_date = "End Date : {}".format(style(challenge["end_date"].split("T")[0], fg="red")) | ||
| date = "\n{}\n\n".format(style(end_date, bold=True)) | ||
| challenge = "{}{}{}{}".format(title, description, date, br) |
evalai/utils/challenges.py
Outdated
|
|
||
| def pretty_print_all_challenge_phases(phases): | ||
| """ | ||
| Function to print all the challenge phase of a challenge. |
There was a problem hiding this comment.
Function to print all the challenge phases of a challenge
evalai/utils/challenges.py
Outdated
|
|
||
| cleaned_desc = BeautifulSoup(phase["description"], "lxml").text | ||
| description = "{}\n\n".format(cleaned_desc) | ||
| phase = "{}{}{}".format(phase_title, description, br) |
There was a problem hiding this comment.
phase -> challenge_phase
evalai/utils/challenges.py
Outdated
| cleaned_desc = BeautifulSoup(phase["description"], "lxml").text | ||
| description = "{}\n\n".format(cleaned_desc) | ||
| phase = "{}{}{}".format(phase_title, description, br) | ||
| echo(phase) |
There was a problem hiding this comment.
phase -> challenge_phase
tests/test_requests.py
Outdated
| responses.add(responses.POST, url.format(API_HOST_URL, URLS.participate_in_a_challenge.value).format("2", "3"), | ||
| body=Exception('...')) | ||
|
|
||
| # Phases URLS |
tests/test_requests.py
Outdated
| self.expected = "Error: Sorry, the object does not exist." | ||
|
|
||
| @responses.activate | ||
| def test_display_phase_lists_for_object_does_not_exist(self): |
There was a problem hiding this comment.
Refer to function name comment above.
tests/test_requests.py
Outdated
| assert response == self.expected | ||
|
|
||
| @responses.activate | ||
| def test_display_phase_details_for_object_does_not_exist(self): |
There was a problem hiding this comment.
Refer to function name comment above.
tests/test_requests.py
Outdated
| assert result.exit_code == -1 | ||
|
|
||
| @responses.activate | ||
| def test_challenge_phase_lists_for_request_exception(self): |
There was a problem hiding this comment.
Refer to function name comment above.
tests/test_requests.py
Outdated
| assert result.exit_code == -1 | ||
|
|
||
| @responses.activate | ||
| def test_challenge_phase_details_for_request_exception(self): |
There was a problem hiding this comment.
Refer to function name comment above.
d3bede5 to
ed6711c
Compare
| json=challenge_data, status=200) | ||
|
|
||
| challenges = challenge_data["results"] | ||
| challenges_json = challenge_data["results"] |
tests/test_requests.py
Outdated
| assert response == expected | ||
|
|
||
|
|
||
| class TestDisplayPhasesWhenObjectDoesNotExist(BaseTestClass): |
There was a problem hiding this comment.
Just a minor change TestDisplayChallengePhasesWhenObjectDoesNotExist
* Fetch phase lists * Fetch phase details
ed6711c to
5354b54
Compare
Uh oh!
There was an error while loading. Please reload this page.