-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tutor integration test
DS-979
(#54)
- Loading branch information
Showing
13 changed files
with
146 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Tutor Integration Tests | ||
on: [pull_request] | ||
|
||
jobs: | ||
integration-test: | ||
name: Tutor Integration Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
tutor_version: ["<17.0.0", "<18.0.0"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: eox-theming | ||
- uses: eduNEXT/integration-test-in-tutor@main | ||
with: | ||
tutor_version: ${{ matrix.tutor_version }} | ||
app_name: "eox-theming" | ||
shell_file_to_run: "eox_theming/tests/tutor/integration.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
The conftest module sets up the database connection for pytest-django. | ||
The integration tests will reuse the database from tutor local so a noop | ||
django_db_setup is required. | ||
See: https://pytest-django.readthedocs.io/en/latest/database.html | ||
""" | ||
|
||
import pytest # pylint: disable=import-error | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def django_db_setup(): | ||
""" | ||
Makes the tests reuse the existing database | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# This script installs the package in the edxapp environment, installs test requirements from Open edX and runs the tests using the Tutor settings. | ||
echo "Install package" | ||
pip install -e /openedx/eox-theming | ||
|
||
echo "Install test-requirements" | ||
make test-requirements | ||
|
||
echo "Run tests" | ||
pytest -s --ds=lms.envs.tutor.test /openedx/eox-theming/eox_theming/tests/tutor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Test integration file. | ||
""" | ||
from django.test import TestCase | ||
|
||
|
||
class TutorIntegrationTestCase(TestCase): | ||
""" | ||
Tests integration with Open edX | ||
""" | ||
|
||
# pylint: disable=import-outside-toplevel, unused-import | ||
def test_current_settings_code_imports(self): | ||
""" | ||
Running this imports means that our backends import the right signature | ||
""" | ||
# isort: off | ||
import eox_theming.edxapp_wrapper.backends.j_configuration_helpers | ||
import eox_theming.edxapp_wrapper.backends.j_finders | ||
import eox_theming.edxapp_wrapper.backends.j_loaders | ||
import eox_theming.edxapp_wrapper.backends.j_models | ||
import eox_theming.edxapp_wrapper.backends.j_theming_helpers | ||
import eox_theming.edxapp_wrapper.backends.l_mako | ||
import eox_theming.edxapp_wrapper.backends.l_storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[pytest] | ||
python_files = integration_test_*.py | ||
filterwarnings = | ||
default | ||
# We ignore every warning while we actually get the testing infrastructure | ||
# running for different version of tutor in gh actions | ||
ignore: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.10 | ||
# This file is autogenerated by pip-compile with Python 3.8 | ||
# by the following command: | ||
# | ||
# make upgrade | ||
# | ||
asgiref==3.7.2 | ||
asgiref==3.8.1 | ||
# via django | ||
django==4.2.9 | ||
backports-zoneinfo==0.2.1 ; python_version < "3.9" | ||
# via | ||
# -c requirements/constraints.txt | ||
# django | ||
django==4.2.13 | ||
# via | ||
# -c requirements/constraints.txt | ||
# -r requirements/base.in | ||
eox-tenant==10.0.0 | ||
eox-tenant==11.2.0 | ||
# via | ||
# -c requirements/constraints.txt | ||
# -r requirements/base.in | ||
six==1.16.0 | ||
# via -r requirements/base.in | ||
sqlparse==0.4.4 | ||
sqlparse==0.5.0 | ||
# via django | ||
typing-extensions==4.9.0 | ||
typing-extensions==4.12.1 | ||
# via asgiref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ coverage | |
mako | ||
path-py | ||
testfixtures | ||
pyyaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.10 | ||
# This file is autogenerated by pip-compile with Python 3.8 | ||
# by the following command: | ||
# | ||
# make upgrade | ||
# | ||
cachetools==5.3.2 | ||
cachetools==5.3.3 | ||
# via tox | ||
chardet==5.2.0 | ||
# via tox | ||
colorama==0.4.6 | ||
# via tox | ||
distlib==0.3.8 | ||
# via virtualenv | ||
filelock==3.13.1 | ||
filelock==3.14.0 | ||
# via | ||
# tox | ||
# virtualenv | ||
packaging==23.2 | ||
packaging==24.0 | ||
# via | ||
# pyproject-api | ||
# tox | ||
platformdirs==4.1.0 | ||
platformdirs==4.2.2 | ||
# via | ||
# tox | ||
# virtualenv | ||
pluggy==1.3.0 | ||
pluggy==1.5.0 | ||
# via tox | ||
pyproject-api==1.6.1 | ||
# via tox | ||
tomli==2.0.1 | ||
# via | ||
# pyproject-api | ||
# tox | ||
tox==4.12.1 | ||
tox==4.15.1 | ||
# via -r requirements/tox.in | ||
virtualenv==20.25.0 | ||
virtualenv==20.26.2 | ||
# via tox |