Method name is _decode_payload not _decode_messages

This commit is contained in:
Daniel A. Wozniak 2024-08-07 16:07:42 -07:00
parent b40833ed15
commit 002ab9103c
2 changed files with 20 additions and 1 deletions

View file

@ -360,7 +360,7 @@ class AsyncPubChannel:
async_methods = [
"connect",
"_decode_messages",
"_decode_payload",
]
close_methods = [
"close",

View 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)