Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
4ffb74de
Commit
4ffb74de
authored
Sep 20, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed broken tests
parent
83a32240
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
course_discovery/apps/api/serializers.py
+1
-0
course_discovery/apps/api/tests/test_serializers.py
+0
-0
course_discovery/apps/course_metadata/tests/factories.py
+5
-6
No files found.
course_discovery/apps/api/serializers.py
View file @
4ffb74de
...
...
@@ -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
:
...
...
course_discovery/apps/api/tests/test_serializers.py
View file @
4ffb74de
This diff is collapsed.
Click to expand it.
course_discovery/apps/course_metadata/tests/factories.py
View file @
4ffb74de
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment