Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lti-xblock-consumer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenJupyter
lti-xblock-consumer
Commits
8f8818b8
Unverified
Commit
8f8818b8
authored
4 years ago
by
Ned Batchelder
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #102 from edx/nedbat/delete-unused-test-helpers
This code isn't used?
parents
b12b7fed
862b6a10
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lti_consumer/tests/unit/test_utils.py
+0
-40
0 additions, 40 deletions
lti_consumer/tests/unit/test_utils.py
with
0 additions
and
40 deletions
lti_consumer/tests/unit/test_utils.py
+
0
−
40
View file @
8f8818b8
...
...
@@ -53,34 +53,6 @@ def make_request(body, method='POST'):
return
request
def
patch_signed_parameters
(
func
):
"""
Prepare the patches for the get_signed_lti_parameters function for tests.
"""
func
=
patch
(
'
lti_consumer.lti.get_oauth_request_signature
'
,
Mock
(
return_value
=
(
'
OAuth oauth_nonce=
"
fake_nonce
"
,
'
'
oauth_timestamp=
"
fake_timestamp
"
, oauth_version=
"
fake_version
"
, oauth_signature_method=
"
fake_method
"
,
'
'
oauth_consumer_key=
"
fake_consumer_key
"
, oauth_signature=
"
fake_signature
"'
))
)(
func
)
func
=
patch
(
'
lti_consumer.lti_xblock.LtiConsumerXBlock.prefixed_custom_parameters
'
,
PropertyMock
(
return_value
=
{
u
'
custom_param_1
'
:
'
custom1
'
,
u
'
custom_param_2
'
:
'
custom2
'
})
)(
func
)
func
=
patch
(
'
lti_consumer.lti_xblock.LtiConsumerXBlock.lti_provider_key_secret
'
,
PropertyMock
(
return_value
=
(
'
t
'
,
'
s
'
))
)(
func
)
func
=
patch
(
'
lti_consumer.lti_xblock.LtiConsumerXBlock.user_id
'
,
PropertyMock
(
return_value
=
FAKE_USER_ID
)
)(
func
)
return
func
def
dummy_processor
(
_xblock
):
...
...
@@ -103,15 +75,3 @@ defaulting_processor.lti_xblock_default_params = {
'
custom_name
'
:
'
Lex
'
,
'
custom_country
'
:
''
,
}
def
faulty_processor
(
_xblock
):
"""
A dummy LTI parameter processor with default params that throws an error.
"""
raise
Exception
()
faulty_processor
.
lti_xblock_default_params
=
{
'
custom_name
'
:
'
Lex
'
,
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment