File tree 2 files changed +27
-0
lines changed
src/ol_openedx_course_sync
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ class CourseSyncParentOrg(models.Model):
21
21
22
22
organization = models .CharField (max_length = 255 , unique = True )
23
23
24
+ class Meta :
25
+ app_label = "ol_openedx_course_sync"
26
+
24
27
def __str__ (self ):
25
28
return f"{ self .organization } Course Sync Parent Org"
26
29
@@ -39,6 +42,9 @@ class CourseSyncMap(models.Model):
39
42
blank = True , help_text = "Comma separated list of target course keys"
40
43
)
41
44
45
+ class Meta :
46
+ app_label = "ol_openedx_course_sync"
47
+
42
48
def __str__ (self ):
43
49
return f"{ self .source_course } Course Sync Map"
44
50
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments