platypush/tests
Fabio Manganiello 245472a4c5
Better event hooks filters.
- Support for nested attributes on event hook conditions. Things like
  these are now possible:

```
from platypush.event.hook import hook
from platypush.message.event.entities import EntityUpdateEvent

@hook(EntityUpdateEvent, entity={"external_id": "system:cpu"})
def on_cpu_update_event(event: EntityUpdateEvent, **_):
    print(event.args["entity"]["percent"])
```

- The scoring/regex extraction/partial string match logic in
  `_matches_argument` is actually only needed for
  `SpeechRecognizedEvent`. Other events don't need these features, and
  event hooks may be actually triggered unexpectedly in case of partial
  matches. Therefore, the "complex" `_matches_argument` has been moved
  as an override only for `SpeechRecognizedEvent`, and all the other
  events will perform simple key-value matching.
2023-04-26 01:45:58 +02:00
..
etc Fix for #217 2022-04-28 00:57:49 +02:00
__init__.py Refactored tests to use pytest with fixtures instead of unittest.TestCase 2021-03-06 16:21:28 +01:00
__main__.py Added tests/__main__.py entry point to run all the tests 2021-03-06 20:13:38 +01:00
conftest.py Clear log objects on teardown to prevent pytest logging errors 2021-03-06 20:02:25 +01:00
test_cron.py Fix for #217 2022-04-28 00:57:49 +02:00
test_event_parse.py Better event hooks filters. 2023-04-26 01:45:58 +02:00
test_http.py Fixed tests 2022-10-08 15:18:26 +02:00
test_procedure.py Check for file creation and content multiple times with timeout 2021-03-06 17:09:40 +01:00
utils.py black fixes 2023-03-31 14:31:38 +02:00