Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-user-state-client
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-user-state-client
Commits
2b4bc8b6
Commit
2b4bc8b6
authored
Jul 27, 2015
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use keyword arguments for calls to client methods, to make sure arguments line up
parent
aa5db60b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
edx_user_state_client/tests.py
+27
-27
No files found.
edx_user_state_client/tests.py
View file @
2b4bc8b6
...
...
@@ -58,9 +58,9 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
get
(
self
.
_user
(
user
),
self
.
_block
(
block
),
self
.
scope
,
username
=
self
.
_user
(
user
),
block_key
=
self
.
_block
(
block
),
s
cope
=
s
elf
.
scope
,
fields
=
fields
)
...
...
@@ -74,10 +74,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
set
(
self
.
_user
(
user
),
self
.
_block
(
block
),
state
,
self
.
scope
,
username
=
self
.
_user
(
user
),
block_key
=
self
.
_block
(
block
),
state
=
state
,
s
cope
=
s
elf
.
scope
,
)
@contract
(
user
=
int
,
block
=
int
,
fields
=
"list(string)|None"
)
...
...
@@ -90,10 +90,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
delete
(
self
.
_user
(
user
),
self
.
_block
(
block
),
self
.
scope
,
fields
username
=
self
.
_user
(
user
),
block_key
=
self
.
_block
(
block
),
s
cope
=
s
elf
.
scope
,
fields
=
fields
)
@contract
(
user
=
int
,
blocks
=
"list(int)"
,
fields
=
"list(string)|None"
)
...
...
@@ -106,10 +106,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
get_many
(
self
.
_user
(
user
),
[
self
.
_block
(
block
)
for
block
in
blocks
],
self
.
scope
,
fields
,
username
=
self
.
_user
(
user
),
block_keys
=
[
self
.
_block
(
block
)
for
block
in
blocks
],
s
cope
=
s
elf
.
scope
,
fields
=
fields
,
)
@contract
(
user
=
int
,
block_to_state
=
"dict(int: dict(string: *))"
)
...
...
@@ -122,13 +122,13 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
set_many
(
self
.
_user
(
user
),
{
username
=
self
.
_user
(
user
),
block_keys_to_state
=
{
self
.
_block
(
block
):
state
for
block
,
state
in
block_to_state
.
items
()
},
self
.
scope
,
s
cope
=
s
elf
.
scope
,
)
@contract
(
user
=
int
,
blocks
=
"list(int)"
,
fields
=
"list(string)|None"
)
...
...
@@ -141,10 +141,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
delete_many
(
self
.
_user
(
user
),
[
self
.
_block
(
block
)
for
block
in
blocks
],
self
.
scope
,
fields
,
username
=
self
.
_user
(
user
),
block_keys
=
[
self
.
_block
(
block
)
for
block
in
blocks
],
s
cope
=
s
elf
.
scope
,
fields
=
fields
,
)
@contract
(
user
=
int
,
block
=
int
)
...
...
@@ -157,9 +157,9 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
get_history
(
self
.
_user
(
user
),
self
.
_block
(
block
),
self
.
scope
,
username
=
self
.
_user
(
user
),
block_key
=
self
.
_block
(
block
),
s
cope
=
s
elf
.
scope
,
)
@contract
(
block
=
int
)
...
...
@@ -172,8 +172,8 @@ class _UserStateClientTestUtils(TestCase):
to write concisely.
"""
return
self
.
client
.
iter_all_for_block
(
self
.
_block
(
block
),
self
.
scope
,
block_key
=
self
.
_block
(
block
),
s
cope
=
s
elf
.
scope
,
)
...
...
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