-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into quex.explore_removing…
…_pylint_ignores
- Loading branch information
Showing
29 changed files
with
839 additions
and
685 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,21 @@ | ||
from __future__ import annotations | ||
|
||
import pytest | ||
|
||
from chia.protocols.full_node_protocol import RequestTransaction | ||
from chia.protocols.protocol_message_types import ProtocolMessageTypes | ||
from chia.server.api_protocol import ApiMetadata | ||
|
||
|
||
def test_api_protocol_raises_for_repeat_request_registration() -> None: | ||
metadata = ApiMetadata() | ||
|
||
@metadata.request(request_type=ProtocolMessageTypes.handshake) | ||
async def f(self: object, request: RequestTransaction) -> None: ... | ||
|
||
async def g(self: object, request: RequestTransaction) -> None: ... | ||
|
||
decorator = metadata.request(request_type=ProtocolMessageTypes.handshake) | ||
|
||
with pytest.raises(Exception, match="request type already registered"): | ||
decorator(g) |
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
Oops, something went wrong.