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
19742e05
Commit
19742e05
authored
Apr 19, 2018
by
Uman Shahzad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the query count number.
parent
b7f56a91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
course_discovery/apps/api/v1/tests/test_views/test_programs.py
+2
-2
No files found.
course_discovery/apps/api/v1/tests/test_views/test_programs.py
View file @
19742e05
...
@@ -115,7 +115,7 @@ class TestProgramViewSet(SerializationMixin):
...
@@ -115,7 +115,7 @@ class TestProgramViewSet(SerializationMixin):
partner
=
self
.
partner
)
partner
=
self
.
partner
)
# property does not have the right values while being indexed
# property does not have the right values while being indexed
del
program
.
_course_run_weeks_to_complete
del
program
.
_course_run_weeks_to_complete
with
django_assert_num_queries
(
3
8
):
with
django_assert_num_queries
(
3
9
):
response
=
self
.
assert_retrieve_success
(
program
)
response
=
self
.
assert_retrieve_success
(
program
)
assert
response
.
data
==
self
.
serialize_program
(
program
)
assert
response
.
data
==
self
.
serialize_program
(
program
)
assert
course_list
==
list
(
program
.
courses
.
all
())
# pylint: disable=no-member
assert
course_list
==
list
(
program
.
courses
.
all
())
# pylint: disable=no-member
...
@@ -124,7 +124,7 @@ class TestProgramViewSet(SerializationMixin):
...
@@ -124,7 +124,7 @@ class TestProgramViewSet(SerializationMixin):
""" Verify the endpoint returns data for a program even if the program's courses have no course runs. """
""" Verify the endpoint returns data for a program even if the program's courses have no course runs. """
course
=
CourseFactory
(
partner
=
self
.
partner
)
course
=
CourseFactory
(
partner
=
self
.
partner
)
program
=
ProgramFactory
(
courses
=
[
course
],
partner
=
self
.
partner
)
program
=
ProgramFactory
(
courses
=
[
course
],
partner
=
self
.
partner
)
with
django_assert_num_queries
(
2
5
):
with
django_assert_num_queries
(
2
6
):
response
=
self
.
assert_retrieve_success
(
program
)
response
=
self
.
assert_retrieve_success
(
program
)
assert
response
.
data
==
self
.
serialize_program
(
program
)
assert
response
.
data
==
self
.
serialize_program
(
program
)
...
...
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