-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: update integration tests workflow and add pytest configuration #66
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4e59547
chore: add pytest to requirements
magajh e9942de
chore(ci): execute tests with pytest and update integration tests wor…
magajh b9bba77
chore: remove tutor test folder
magajh 5d96aa8
fix: leave script to execute integration tests empty
magajh cc5ab10
refactor: create target and add eox-info test case for integration tests
magajh 990da8f
refactor: relocate info view integration test
magajh 5615bda
chore: add requests and djangorestframework to test requirements
magajh 7a91541
chore: add drf constraint
magajh 7864869
fix: script to execute integration tests
magajh 3a78284
fix: integration tests target
magajh cb082e7
fix: add eox-tenant as extra requirements
magajh 9e0399b
fix: tox ini file
magajh 2cb1744
fix: makefile target for integration tests
magajh ab3383d
chore(ci): install setuptools and improve info view test
magajh 9957719
fix: makefile target
magajh 522a9aa
fix: eox-info re_path for reverse use
magajh 62be996
fix: info view integration test
magajh 8e904f0
fix: use main branch in integration tests action
magajh 0e0253a
chore(ci): remove shell_file_to_run input
magajh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
File renamed without changes.
Empty file.
17 changes: 17 additions & 0 deletions
17
eox_theming/edxapp_wrapper/tests/integration/test_backends.py
This file contains hidden or 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,17 @@ | ||
""" | ||
This module tests the backends of the edxapp_wrapper | ||
""" | ||
|
||
|
||
# pylint: disable=import-outside-toplevel, unused-import | ||
def test_current_settings_code_imports(): | ||
""" | ||
Running this imports means that our backends import the right signature | ||
""" | ||
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 |
Empty file.
Empty file.
This file contains hidden or 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,33 @@ | ||
""" | ||
Integration test for EOX Info view. | ||
""" | ||
import requests | ||
from django.conf import settings as ds | ||
from django.test import TestCase | ||
from django.urls import reverse | ||
from rest_framework import status | ||
|
||
settings = ds.INTEGRATION_TEST_SETTINGS | ||
|
||
|
||
class TestInfoView(TestCase): | ||
""" | ||
Integration test suite for the info view. | ||
""" | ||
|
||
def test_info_view_success(self) -> None: | ||
"""Test the info view. | ||
|
||
Expected result: | ||
- The status code is 200. | ||
- The response contains the version, name and git commit hash. | ||
""" | ||
url = f"{settings['EOX_THEMING_BASE_URL']}{reverse('eox-theming-management:eox-info')}" | ||
|
||
response = requests.get(url, timeout=settings["API_TIMEOUT"]) | ||
|
||
response_data = response.json() | ||
self.assertEqual(response.status_code, status.HTTP_200_OK) | ||
self.assertIn("version", response_data) | ||
self.assertIn("name", response_data) | ||
self.assertIn("git", response_data) |
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,3 @@ | ||
#!/bin/bash | ||
|
||
make run-integration-tests |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.