-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ ifneq ($(MAKECMDGOALS),clean) | |
# -------- # | ||
|
||
$(call add_substitution, PACKAGE_NAME, hades) | ||
$(call add_substitution, PACKAGE_VERSION, 0.5.0) | ||
$(call add_substitution, PACKAGE_VERSION, 0.5.1) | ||
$(call add_substitution, PACKAGE_DESCRIPTION, Distributed AG DSN RADIUS MAC authentication. Site node agent and captive portal) | ||
$(call add_substitution, PACKAGE_AUTHOR, Sebastian Schrader) | ||
$(call add_substitution, PACKAGE_AUTHOR_EMAIL, [email protected]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
hades (0.5.1) bullseye; urgency=high | ||
|
||
* Fix bug breaking any RPC method call (GH-119) | ||
|
||
-- <[email protected]> Mon, 19 Sep 2022 13:51:20 +0000 | ||
|
||
hades (0.5.0) bullseye; urgency=low | ||
|
||
* Upgrade to Debian bullseye (GH-94, GH-99, GH-103, GH-113) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
from celery.utils.threads import LocalStack | ||
|
||
from hades.agent.tasks import RPCTask, rpc_task | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="session") | ||
def celery_request_context(): | ||
RPCTask.request_stack = LocalStack() | ||
|
||
|
||
def test_rpc_task_nullary(): | ||
@rpc_task() | ||
def const5() -> int: | ||
return 5 | ||
|
||
assert const5() == 5 | ||
|
||
|
||
def test_rpc_task_unary(): | ||
@rpc_task() | ||
def add1(i: int) -> int: | ||
return i + 1 | ||
|
||
assert add1(1) == 2 | ||
|
||
|
||
def test_rpc_task_unary_kwonly(): | ||
@rpc_task() | ||
def add1(*, i: int) -> int: | ||
return i + 1 | ||
|
||
assert add1(i=1) == 2 |