Commit 4ffb74de by Clinton Blackburn

Fixed broken tests

parent 83a32240
......@@ -333,6 +333,7 @@ class ContainedCourseRunsSerializer(serializers.Serializer):
class MinimalCourseSerializer(TimestampModelSerializer):
course_runs = MinimalCourseRunSerializer(many=True)
owners = MinimalOrganizationSerializer(many=True, source='authoring_organizations')
class Meta:
......
......@@ -239,13 +239,17 @@ class ProgramFactory(factory.django.DjangoModelFactory):
title = factory.Sequence(lambda n: 'test-program-{}'.format(n)) # pylint: disable=unnecessary-lambda
uuid = factory.LazyFunction(uuid4)
subtitle = 'test-subtitle'
subtitle = FuzzyText()
type = factory.SubFactory(ProgramTypeFactory)
status = ProgramStatus.Unpublished
marketing_slug = factory.Sequence(lambda n: 'test-slug-{}'.format(n)) # pylint: disable=unnecessary-lambda
banner_image_url = FuzzyText(prefix='https://example.com/program/banner')
card_image_url = FuzzyText(prefix='https://example.com/program/card')
partner = factory.SubFactory(PartnerFactory)
overview = FuzzyText()
weeks_to_complete = FuzzyInteger(1)
min_hours_effort_per_week = FuzzyInteger(2)
max_hours_effort_per_week = FuzzyInteger(4)
credit_redemption_overview = FuzzyText()
@factory.post_generation
......@@ -289,11 +293,6 @@ class ProgramFactory(factory.django.DjangoModelFactory):
add_m2m_data(self.individual_endorsements, extracted)
@factory.post_generation
def staff(self, create, extracted, **kwargs):
if create: # pragma: no cover
add_m2m_data(self.staff, extracted)
@factory.post_generation
def job_outlook_items(self, create, extracted, **kwargs):
if create: # pragma: no cover
add_m2m_data(self.job_outlook_items, extracted)
......
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