Commit 3a78f878 by Peter Fogg

Expose course marketing URL.

parent 462b89cf
......@@ -141,6 +141,7 @@ class CourseSerializer(TimestampModelSerializer):
fields = (
'key', 'title', 'short_description', 'full_description', 'level_type', 'subjects', 'prerequisites',
'expected_learning_items', 'image', 'video', 'owners', 'sponsors', 'modified', 'course_runs',
'marketing_url'
)
......
......@@ -59,7 +59,8 @@ class CourseSerializerTests(TestCase):
'owners': [],
'sponsors': [],
'modified': json_date_format(course.modified), # pylint: disable=no-member
'course_runs': CourseRunSerializer(course.course_runs, many=True).data
'course_runs': CourseRunSerializer(course.course_runs, many=True).data,
'marketing_url': course.marketing_url
}
self.assertDictEqual(serializer.data, expected)
......
......@@ -89,6 +89,7 @@ class CourseFactory(factory.DjangoModelFactory):
level_type = factory.SubFactory(LevelTypeFactory)
image = factory.SubFactory(ImageFactory)
video = factory.SubFactory(VideoFactory)
marketing_url = FuzzyText(prefix='https://example.com/test-course-url')
class Meta:
model = Course
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment