forked from platypush/platypush
.context needs to be imported in test_event_parse to make sure that the configuration is properly initialized
This commit is contained in:
parent
ef36c76f10
commit
531be19a66
1 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
|
import logging
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
from .context import config_file
|
||||||
from platypush.event.hook import EventCondition
|
from platypush.event.hook import EventCondition
|
||||||
from platypush.message.event.ping import PingEvent
|
from platypush.message.event.ping import PingEvent
|
||||||
|
|
||||||
|
@ -12,6 +14,7 @@ class TestEventParse(unittest.TestCase):
|
||||||
})
|
})
|
||||||
|
|
||||||
def test_event_parse(self):
|
def test_event_parse(self):
|
||||||
|
logging.info('Starting test on configuration file: {}'.format(config_file))
|
||||||
message = "GARBAGE GARBAGE this is the answer: 42"
|
message = "GARBAGE GARBAGE this is the answer: 42"
|
||||||
event = PingEvent(message=message)
|
event = PingEvent(message=message)
|
||||||
result = event.matches_condition(self.condition)
|
result = event.matches_condition(self.condition)
|
||||||
|
|
Loading…
Reference in a new issue