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
a0629003
Commit
a0629003
authored
Dec 15, 2014
by
Ben Patterson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6240 from edx/benp/fix-analytics-init
Mock out the underlying segment-io call.
parents
18f69809
e0f83ded
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
common/djangoapps/third_party_auth/tests/specs/base.py
+2
-0
lms/djangoapps/shoppingcart/tests/test_models.py
+4
-1
No files found.
common/djangoapps/third_party_auth/tests/specs/base.py
View file @
a0629003
...
...
@@ -424,6 +424,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase):
request
,
strategy
=
self
.
get_request_and_strategy
(
auth_entry
=
pipeline
.
AUTH_ENTRY_LOGIN
,
redirect_uri
=
'social:complete'
)
strategy
.
backend
.
auth_complete
=
mock
.
MagicMock
(
return_value
=
self
.
fake_auth_complete
(
strategy
))
pipeline
.
analytics
.
track
=
mock
.
MagicMock
()
request
.
user
=
self
.
create_user_models_for_existing_account
(
strategy
,
'user@example.com'
,
'password'
,
self
.
get_username
(),
skip_social_auth
=
True
)
...
...
@@ -558,6 +559,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase):
request
,
strategy
=
self
.
get_request_and_strategy
(
auth_entry
=
pipeline
.
AUTH_ENTRY_LOGIN
,
redirect_uri
=
'social:complete'
)
strategy
.
backend
.
auth_complete
=
mock
.
MagicMock
(
return_value
=
self
.
fake_auth_complete
(
strategy
))
pipeline
.
analytics
.
track
=
mock
.
MagicMock
()
user
=
self
.
create_user_models_for_existing_account
(
strategy
,
'user@example.com'
,
'password'
,
self
.
get_username
())
self
.
assert_social_auth_exists_for_user
(
user
,
strategy
)
...
...
lms/djangoapps/shoppingcart/tests/test_models.py
View file @
a0629003
...
...
@@ -3,6 +3,7 @@ Tests for the Shopping Cart Models
"""
from
decimal
import
Decimal
import
datetime
import
sys
import
smtplib
from
boto.exception
import
BotoServerError
# this is a super-class of SESError and catches connection errors
...
...
@@ -233,7 +234,9 @@ class OrderTest(ModuleStoreTestCase):
item
=
CertificateItem
.
add_to_order
(
cart
,
self
.
course_key
,
self
.
cost
,
'honor'
)
# course enrollment object should be created but still inactive
self
.
assertFalse
(
CourseEnrollment
.
is_enrolled
(
self
.
user
,
self
.
course_key
))
cart
.
purchase
()
# the analytics client pipes output to stderr when using the default client
with
patch
(
'sys.stderr'
,
sys
.
stdout
.
write
):
cart
.
purchase
()
self
.
assertTrue
(
CourseEnrollment
.
is_enrolled
(
self
.
user
,
self
.
course_key
))
# test e-mail sending
...
...
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