mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #66790 from dwoz/issue/3006.x/66789
[3006.x] Method name is _decode_payload not _decode_messages
This commit is contained in:
commit
8b33b7fbaf
3 changed files with 21 additions and 1 deletions
1
changelog/66789.fixed.md
Normal file
1
changelog/66789.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fix bad async_method name on AsyncPubClient class
|
|
@ -360,7 +360,7 @@ class AsyncPubChannel:
|
|||
|
||||
async_methods = [
|
||||
"connect",
|
||||
"_decode_messages",
|
||||
"_decode_payload",
|
||||
]
|
||||
close_methods = [
|
||||
"close",
|
||||
|
|
19
tests/pytests/unit/channel/test_client.py
Normal file
19
tests/pytests/unit/channel/test_client.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import salt.channel.client
|
||||
|
||||
|
||||
def test_async_methods():
|
||||
"Validate all defined async_methods and close_methods are present"
|
||||
async_classes = [
|
||||
salt.channel.client.AsyncReqChannel,
|
||||
salt.channel.client.AsyncPubChannel,
|
||||
]
|
||||
method_attrs = [
|
||||
"async_methods",
|
||||
"close_methods",
|
||||
]
|
||||
for cls in async_classes:
|
||||
for attr in method_attrs:
|
||||
assert hasattr(cls, attr)
|
||||
assert isinstance(getattr(cls, attr), list)
|
||||
for name in getattr(cls, attr):
|
||||
assert hasattr(cls, name)
|
Loading…
Add table
Reference in a new issue