-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add integration test file (#267)
* feat: add integration test file * feat: add integration test file * fix: plugin_settings function * fix: plugin_settings function * fix: plugin_settings function * fix: plugin_settings function * fix: plugin_settings function * fix: plugin_settings function
- Loading branch information
1 parent
51b73d2
commit beddb10
Showing
7 changed files
with
64 additions
and
0 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
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,26 @@ | ||
""" | ||
Test integration file. | ||
""" | ||
from django.test import TestCase | ||
|
||
|
||
class TutorIntegrationTestCase(TestCase): | ||
""" | ||
Tests integration with openedx | ||
""" | ||
|
||
# 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 | ||
""" | ||
import eox_core.edxapp_wrapper.backends.bearer_authentication_j_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.certificates_m_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.comments_service_users_j_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.configuration_helpers_h_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.coursekey_m_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.edxfuture_o_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.grades_h_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.pre_enrollment_l_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.storages_i_v1 # isort:skip | ||
import eox_core.edxapp_wrapper.backends.third_party_auth_l_v1 # isort:skip |
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ pytest | |
pytest-django | ||
testfixtures | ||
django-countries | ||
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