Commit 2b4bc8b6 by Calen Pennington

Use keyword arguments for calls to client methods, to make sure arguments line up

parent aa5db60b
...@@ -58,9 +58,9 @@ class _UserStateClientTestUtils(TestCase): ...@@ -58,9 +58,9 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.get( return self.client.get(
self._user(user), username=self._user(user),
self._block(block), block_key=self._block(block),
self.scope, scope=self.scope,
fields=fields fields=fields
) )
...@@ -74,10 +74,10 @@ class _UserStateClientTestUtils(TestCase): ...@@ -74,10 +74,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.set( return self.client.set(
self._user(user), username=self._user(user),
self._block(block), block_key=self._block(block),
state, state=state,
self.scope, scope=self.scope,
) )
@contract(user=int, block=int, fields="list(string)|None") @contract(user=int, block=int, fields="list(string)|None")
...@@ -90,10 +90,10 @@ class _UserStateClientTestUtils(TestCase): ...@@ -90,10 +90,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.delete( return self.client.delete(
self._user(user), username=self._user(user),
self._block(block), block_key=self._block(block),
self.scope, scope=self.scope,
fields fields=fields
) )
@contract(user=int, blocks="list(int)", fields="list(string)|None") @contract(user=int, blocks="list(int)", fields="list(string)|None")
...@@ -106,10 +106,10 @@ class _UserStateClientTestUtils(TestCase): ...@@ -106,10 +106,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.get_many( return self.client.get_many(
self._user(user), username=self._user(user),
[self._block(block) for block in blocks], block_keys=[self._block(block) for block in blocks],
self.scope, scope=self.scope,
fields, fields=fields,
) )
@contract(user=int, block_to_state="dict(int: dict(string: *))") @contract(user=int, block_to_state="dict(int: dict(string: *))")
...@@ -122,13 +122,13 @@ class _UserStateClientTestUtils(TestCase): ...@@ -122,13 +122,13 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.set_many( return self.client.set_many(
self._user(user), username=self._user(user),
{ block_keys_to_state={
self._block(block): state self._block(block): state
for block, state for block, state
in block_to_state.items() in block_to_state.items()
}, },
self.scope, scope=self.scope,
) )
@contract(user=int, blocks="list(int)", fields="list(string)|None") @contract(user=int, blocks="list(int)", fields="list(string)|None")
...@@ -141,10 +141,10 @@ class _UserStateClientTestUtils(TestCase): ...@@ -141,10 +141,10 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.delete_many( return self.client.delete_many(
self._user(user), username=self._user(user),
[self._block(block) for block in blocks], block_keys=[self._block(block) for block in blocks],
self.scope, scope=self.scope,
fields, fields=fields,
) )
@contract(user=int, block=int) @contract(user=int, block=int)
...@@ -157,9 +157,9 @@ class _UserStateClientTestUtils(TestCase): ...@@ -157,9 +157,9 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.get_history( return self.client.get_history(
self._user(user), username=self._user(user),
self._block(block), block_key=self._block(block),
self.scope, scope=self.scope,
) )
@contract(block=int) @contract(block=int)
...@@ -172,8 +172,8 @@ class _UserStateClientTestUtils(TestCase): ...@@ -172,8 +172,8 @@ class _UserStateClientTestUtils(TestCase):
to write concisely. to write concisely.
""" """
return self.client.iter_all_for_block( return self.client.iter_all_for_block(
self._block(block), block_key=self._block(block),
self.scope, scope=self.scope,
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment