Skip to content

Commit

Permalink
Typos cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarta committed Dec 7, 2019
1 parent d6bf65d commit bf57fe5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions qrexec/tests/qrexec_policy_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def test_simple_request(self, mock_request, async_server, tmp_path):
domain_id='a', source='b', intended_target='c',
service_and_arg='d', process_ident='1 9', log=unittest.mock.ANY,
policy_cache=unittest.mock.ANY,
allow_resolution_type=qrexec_policy_daemon.DaemonResolution,
allow_resolution_type=qrexec_policy_daemon.DaemonAllowResolution,
origin_writer=unittest.mock.ANY)

@pytest.mark.asyncio
Expand All @@ -104,7 +104,7 @@ async def test_complex_request(self, mock_request, async_server, tmp_path):
service_and_arg='d', process_ident='9', log=unittest.mock.ANY,
assume_yes_for_ask=True, just_evaluate=True,
policy_cache=unittest.mock.ANY,
allow_resolution_type=qrexec_policy_daemon.DaemonResolution,
allow_resolution_type=qrexec_policy_daemon.DaemonAllowResolution,
origin_writer=unittest.mock.ANY)

@pytest.mark.asyncio
Expand All @@ -125,7 +125,7 @@ async def test_complex_request2(self, mock_request, async_server, tmp_path):
service_and_arg='d', process_ident='9', log=unittest.mock.ANY,
assume_yes_for_ask=False, just_evaluate=False,
policy_cache=unittest.mock.ANY,
allow_resolution_type=qrexec_policy_daemon.DaemonResolution,
allow_resolution_type=qrexec_policy_daemon.DaemonAllowResolution,
origin_writer=unittest.mock.ANY)

@pytest.mark.asyncio
Expand Down Expand Up @@ -176,7 +176,7 @@ async def test_duplicate_arg(self, mock_request, async_server, tmp_path):
@pytest.mark.asyncio
async def test_wrong_arg(self, mock_request, async_server, tmp_path):

data = b'domains_id=a\n' \
data = b'tremendous_domain_id=a\n' \
b'source=b\n' \
b'intended_target=c\n' \
b'service_and_arg=d\n' \
Expand Down
6 changes: 3 additions & 3 deletions qrexec/tools/qrexec_policy_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
OPTIONAL_REQUEST_ARGUMENTS


class DaemonResolution(AllowResolution):
class DaemonAllowResolution(AllowResolution):
async def execute(self, caller_ident):

log_prefix = 'qrexec: {request.service}+{request.argument}: ' \
Expand All @@ -62,7 +62,7 @@ async def execute(self, caller_ident):
self.request.origin_writer.write(b"result=allow\n")
await self.request.origin_writer.drain()

await super(DaemonResolution, self).execute(caller_ident)
await super(DaemonAllowResolution, self).execute(caller_ident)


async def handle_client_connection(log, policy_cache,
Expand Down Expand Up @@ -108,7 +108,7 @@ async def handle_client_connection(log, policy_cache,
'error parsing policy request: required argument missing')
return

resolution_handler = DaemonResolution
resolution_handler = DaemonAllowResolution

result = await handle_request(**args, log=log,
allow_resolution_type=resolution_handler,
Expand Down

0 comments on commit bf57fe5

Please sign in to comment.