Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
49b11cb6
Commit
49b11cb6
authored
May 12, 2017
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude UTM parameters from marketing URLs when caching programs
LEARNER-382
parent
4919868c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
openedx/core/djangoapps/catalog/management/commands/cache_programs.py
+1
-1
openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py
+9
-1
No files found.
openedx/core/djangoapps/catalog/management/commands/cache_programs.py
View file @
49b11cb6
...
...
@@ -58,7 +58,7 @@ class Command(BaseCommand):
for
uuid
in
uuids
:
try
:
logger
.
info
(
'Requesting details for program {uuid}.'
.
format
(
uuid
=
uuid
))
program
=
client
.
programs
(
uuid
)
.
get
()
program
=
client
.
programs
(
uuid
)
.
get
(
exclude_utm
=
1
)
cache_key
=
PROGRAM_CACHE_KEY_TPL
.
format
(
uuid
=
uuid
)
programs
[
cache_key
]
=
program
...
...
openedx/core/djangoapps/catalog/management/commands/tests/test_cache_programs.py
View file @
49b11cb6
...
...
@@ -46,10 +46,18 @@ class TestCachePrograms(CatalogIntegrationMixin, CacheIsolationTestCase):
)
def
mock_detail
(
self
,
uuid
,
program
):
def
detail_callback
(
request
,
uri
,
headers
):
expected
=
{
'exclude_utm'
:
[
'1'
],
}
self
.
assertEqual
(
request
.
querystring
,
expected
)
return
(
200
,
headers
,
json
.
dumps
(
program
))
httpretty
.
register_uri
(
httpretty
.
GET
,
self
.
detail_tpl
.
format
(
uuid
=
uuid
),
body
=
json
.
dumps
(
program
)
,
body
=
detail_callback
,
content_type
=
'application/json'
)
...
...
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