Skip to content

Commit 5af15cd

Browse files
committed
rough
1 parent 0997c27 commit 5af15cd

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/ol_openedx_course_sync/models.py

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class CourseSyncParentOrg(models.Model):
2121

2222
organization = models.CharField(max_length=255, unique=True)
2323

24+
class Meta:
25+
app_label = "ol_openedx_course_sync"
26+
2427
def __str__(self):
2528
return f"{self.organization} Course Sync Parent Org"
2629

@@ -39,6 +42,9 @@ class CourseSyncMap(models.Model):
3942
blank=True, help_text="Comma separated list of target course keys"
4043
)
4144

45+
class Meta:
46+
app_label = "ol_openedx_course_sync"
47+
4248
def __str__(self):
4349
return f"{self.source_course} Course Sync Map"
4450

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""
2+
Tests for models
3+
"""
4+
5+
from ol_openedx_course_sync.models import CourseSyncMap
6+
from openedx.core.djangolib.testing.utils import skip_unless_cms
7+
8+
9+
@skip_unless_cms
10+
def test_course_sync_map_clean():
11+
"""
12+
Test the clean method of CourseSyncMap model.
13+
"""
14+
course_sync_map = CourseSyncMap(
15+
source_course="course-v1:UAI+UAI102+R5",
16+
target_courses=["target_course_1", "target_course_2"],
17+
)
18+
19+
course_sync_map.clean()
20+
21+
assert True

0 commit comments

Comments
 (0)