Delegate mqtt topic match validation to the paho mqtt client (#16403)
* Delegate mqtt match topics to the paho mqtt client * Fixing linting error with importing MQTTMatcher
This commit is contained in:
1 parent
8fa9992589
commit
e61ac1a4a1
2 files changed
+17
-18
No files matched your search
@@ -277,6 +277,15 @@ class TestMQTTCallbacks(unittest.TestCase):
|
||||
self.hass.block_till_done()
|
||||
self.assertEqual(0, len(self.calls))
|
||||
|
||||
def test_subscribe_topic_level_wildcard_root_topic_no_subtree_match(self):
|
||||
"""Test the subscription of wildcard topics."""
|
||||
mqtt.subscribe(self.hass, 'test-topic/#', self.record_calls)
|
||||
|
||||
fire_mqtt_message(self.hass, 'test-topic-123', 'test-payload')
|
||||
|
||||
self.hass.block_till_done()
|
||||
self.assertEqual(0, len(self.calls))
|
||||
|
||||
def test_subscribe_topic_subtree_wildcard_subtree_topic(self):
|
||||
"""Test the subscription of wildcard topics."""
|
||||
mqtt.subscribe(self.hass, 'test-topic/#', self.record_calls)
|
||||
|
||||
Reference in new issue
Block a user