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

feat: add integration tests for the enrollments api AP-1346 #280

Merged
merged 33 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e344fd1
feat: add tutor command to import democourse
BryanttV Sep 19, 2024
7a8fe05
chore: add output in tests
BryanttV Sep 20, 2024
46774d4
feat: add openedx organization in fixtures and improve the format
BryanttV Sep 20, 2024
2d68332
test: add enrollment api integration tests
BryanttV Sep 20, 2024
c5c25c0
feat: add fixtures for course modes
BryanttV Sep 23, 2024
eb43544
test: add remaining integration tests
BryanttV Sep 23, 2024
5ec008a
chore: fix pylint errors
BryanttV Sep 23, 2024
041273a
fix: add missing ddt function in class decorator
BryanttV Sep 23, 2024
50a67dc
chore: move users data to fake_users file
BryanttV Sep 23, 2024
4cdee58
chore: remove utils folder
BryanttV Sep 23, 2024
cb0039b
docs: update methods docstring in the tests
BryanttV Sep 23, 2024
7b10550
feat: update matrix in integration tests workflow
BryanttV Sep 23, 2024
f8533d7
fix: use correct course_id
BryanttV Sep 24, 2024
9dbce66
fix: add organizations and course modes for course_id of quince
BryanttV Sep 24, 2024
2305410
chore: add test_enrollment_integration file
BryanttV Sep 24, 2024
486246b
chore: add missing letter
BryanttV Sep 26, 2024
843c9b1
refactor: include force field in ddt data when creating enrollment
BryanttV Sep 26, 2024
1e547be
test: add value for each param
BryanttV Sep 26, 2024
d6e84e2
docs: update docstring and name of methods
BryanttV Sep 26, 2024
31fada0
chore: add f flag to show a short test summary info
BryanttV Sep 26, 2024
a710bcc
refactor: create user in the setup method
BryanttV Sep 26, 2024
05a0e18
chore: remove old enrollments api integrations tests
BryanttV Sep 26, 2024
69692fa
test: check the applications state after each update
BryanttV Sep 27, 2024
658b2fb
chore: remove tutor command to import demo course in shell file
BryanttV Sep 27, 2024
8914e37
ci: update workflow to use new version of integration test in tutor a…
BryanttV Sep 27, 2024
a7bae95
chore: use demo_course_id variable name instead course_id
BryanttV Sep 27, 2024
6ba8bb0
chore: avoid extra changes in fixtures
BryanttV Sep 27, 2024
543ab51
Revert "chore: avoid extra changes in fixtures"
BryanttV Sep 27, 2024
cb6ce0b
chore: use a string instead of object in fixtures
BryanttV Sep 27, 2024
5a98fd8
ci: add tutor nightly in integration tests workflow
BryanttV Sep 27, 2024
88ee4f3
fix: fix typo
BryanttV Sep 27, 2024
c5607d3
chore: update dates in fixtures
BryanttV Sep 27, 2024
a42c186
refactor: add api urls in its corresponding mixin
BryanttV Sep 30, 2024
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: 4 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
tutor_version: ['<18.0.0', '<19.0.0']
tutor_version: ['<18.0.0', '<19.0.0', 'nightly']
steps:
- name: Run Integration Tests
uses: eduNEXT/integration-test-in-tutor@mjh/run-integration-tests-outside-container
with:
tutor_version: ${{ matrix.tutor_version }}
app_name: 'eox-core'
openedx_extra_pip_requeriments: 'eox-tenant'
openedx_extra_pip_requirements: 'eox-tenant'
shell_file_to_run: 'scripts/execute_integration_tests.sh'
fixtures_file: 'fixtures/initial_data.json'
openedx_imports_test_file_path: 'eox_core/edxapp_wrapper/tests/integration/test_backends.py'
openedx_imports_test_function_name: 'test_current_settings_code_imports'
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ python-quality-test:
run-tests: python-test python-quality-test

run-integration-tests: install-dev-dependencies
pytest ./eox_core --ignore-glob='**/unit/*' --ignore-glob='**/edxapp_wrapper/*'
pytest -rPf ./eox_core --ignore-glob='**/unit/*' --ignore-glob='**/edxapp_wrapper/*'

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
Expand Down
52 changes: 52 additions & 0 deletions eox_core/api/v1/tests/integration/data/fake_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,57 @@
"city": "Charleston",
"goals": "Aenean vulputate eleifend tellus.",
},
{
"username": "gwalker33",
"email": "gwalker33@protonmail.com",
"fullname": "Gary Walker",
"password": "zP7%1Yt!dB@",
"activate_user": True,
"mailing_address": "321 Birch Road",
"year_of_birth": 1996,
"gender": "m",
"level_of_education": "hs",
"city": "Sacramento",
"goals": "Praesent vestibulum dapibus nibh.",
},
{
"username": "tturner34",
"email": "tturner34@live.com",
"fullname": "Tina Turner",
"password": "wJ4@5Lm!tQ#",
"activate_user": False,
"mailing_address": "753 Pine Street",
"year_of_birth": 1988,
"gender": "f",
"level_of_education": "m",
"city": "Portland",
"goals": "Duis lobortis massa nec est.",
},
{
"username": "jwhite35",
"email": "jwhite35@gmail.com",
"fullname": "Jack White",
"password": "qB2%9Cv!xF@",
"activate_user": True,
"mailing_address": "159 Spruce Lane",
"year_of_birth": 1995,
"gender": "m",
"level_of_education": "hs",
"city": "New Orleans",
"goals": "Vestibulum volutpat pretium libero.",
},
{
"username": "gwalker33",
"email": "gwalker33@protonmail.com",
"fullname": "Gary Walker",
"password": "zP7%1Yt!dB@",
"activate_user": True,
"mailing_address": "321 Birch Road",
"year_of_birth": 1996,
"gender": "m",
"level_of_education": "hs",
"city": "Sacramento",
"goals": "Praesent vestibulum dapibus nibh.",
},
]
)
Loading
Loading