Skip to content

Commit 91f0735

Browse files
committed
chore: add base test
1 parent eb94f70 commit 91f0735

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ jobs:
3737
TOXENV: ${{ matrix.toxenv }}
3838
run: tox
3939

40-
- name: Run coverage
41-
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
42-
uses: codecov/codecov-action@v4
43-
with:
44-
token: ${{ secrets.CODECOV_TOKEN }}
45-
flags: unittests
46-
fail_ci_if_error: true
47-
working-directory: "./backend"
48-
4940
test_frontend:
5041
name: Frontend Tests
5142
runs-on: ${{ matrix.os }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
Tests to verify the plugin is discoverable and loaded correctly.
3+
"""
4+
5+
from django.apps import apps
6+
from django.conf import settings
7+
8+
9+
def test_app_is_installed():
10+
"""
11+
Test that the plugin app is installed in Django.
12+
13+
This confirms that the plugin entrypoints are correct and that the
14+
plugin tooling was able to correctly load the plugin and add the app to
15+
INSTALLED_APPS
16+
17+
"""
18+
assert (
19+
"openedx_ai_badges.apps.OpenedxAIBadgesConfig"
20+
in settings.INSTALLED_APPS
21+
)
22+
assert apps.get_app_config("openedx_ai_badges") is not None
23+
24+
25+
# We don't do a test for the URLs because the namespaced urls which should be auto registered are tested in the
26+
# test_api.py tests.

0 commit comments

Comments
 (0)