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:
David Murphy 2024-08-08 10:00:29 -06:00 committed by GitHub
commit 8b33b7fbaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 1 deletions

1
changelog/66789.fixed.md Normal file
View file

@ -0,0 +1 @@
Fix bad async_method name on AsyncPubClient class

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)