.context needs to be imported in test_event_parse to make sure that the configuration is properly initialized

This commit is contained in:
Fabio Manganiello 2021-02-24 00:35:41 +01:00
parent ef36c76f10
commit 531be19a66

View file

@ -1,5 +1,7 @@
import logging
import unittest
from .context import config_file
from platypush.event.hook import EventCondition
from platypush.message.event.ping import PingEvent
@ -12,6 +14,7 @@ class TestEventParse(unittest.TestCase):
})
def test_event_parse(self):
logging.info('Starting test on configuration file: {}'.format(config_file))
message = "GARBAGE GARBAGE this is the answer: 42"
event = PingEvent(message=message)
result = event.matches_condition(self.condition)