Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests for Submission worker. #2336

Merged
merged 15 commits into from
Jul 8, 2019
Merged

Conversation

KhalidRmb
Copy link
Member

Following tests are covered:

  • download_and_extract_file
  • download_and_extract_zip_file
  • create_dir
  • create_dir_as_python_package
  • return_file_per_environment
  • get_or_create_sqs_queue

@KhalidRmb
Copy link
Member Author

KhalidRmb commented May 23, 2019

@RishabhJain2018 The command I used to run the tests:DJANGO_SETTINGS_MODULE=settings.test DJANGO_SERVER=testserver pytest ./tests/unit/submissionworker/test_worker.py

@KhalidRmb
Copy link
Member Author

@Ram81

@Ram81
Copy link
Member

Ram81 commented Jun 3, 2019

@KhalidRmb were you able to resolve the issue with test_download_and_extract_zip ?

@KhalidRmb
Copy link
Member Author

@Ram81 No, I've done a corrupt file check as specified in the zipfile docs, but they pass. Rishabh is looking into it I think.

@Ram81
Copy link
Member

Ram81 commented Jun 8, 2019

@KhalidRmb why are the travis build failing can you fix that? if it is a blocker let's add that test later on. For now just add the tests that are working

tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
@KhalidRmb KhalidRmb changed the title [WIP] Unit tests for Submission worker. Unit tests for Submission worker. Jun 10, 2019
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
@KhalidRmb
Copy link
Member Author

@KhalidRmb why are the travis build failing can you fix that? if it is a blocker let's add that test later on. For now just add the tests that are working

Use this command for running the tests, to avoid travis errors. A new PR is required to change the env variable DJANGO_SERVER to testserver in test environment.
DJANGO_SETTINGS_MODULE=settings.test DJANGO_SERVER=testserver pytest ./tests/unit/submissionworker/test_worker.py

@Ram81
Copy link
Member

Ram81 commented Jun 25, 2019

@KhalidRmb please remove the failing tests on which you are blocked, so that we can merge rest of the PR

@KhalidRmb
Copy link
Member Author

@KhalidRmb please remove the failing tests on which you are blocked, so that we can merge rest of the PR

Done @Ram81

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirements/dev.txt Outdated Show resolved Hide resolved
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
tests/unit/submissionworker/test_worker.py Outdated Show resolved Hide resolved
@RishabhJain2018 RishabhJain2018 merged commit 883c276 into Cloud-CV:master Jul 8, 2019
KhalidRmb added a commit to KhalidRmb/EvalAI that referenced this pull request Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants