- Documented the test

- Removed Python 3.4 support in Travis
This commit is contained in:
Fabio Manganiello 2017-12-22 02:40:06 +01:00
parent a26466a4bf
commit bdf964531f
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,5 @@
language: python language: python
python: python:
- "3.4"
- "3.5" - "3.5"
- "3.6" - "3.6"

View File

@ -1,10 +1,8 @@
from .context import platypush, config_file, TestTimeoutException from .context import platypush, config_file, TestTimeoutException
import os
import sys import sys
import logging import logging
import unittest import unittest
import threading
from threading import Thread from threading import Thread
@ -14,6 +12,9 @@ from platypush.pusher import Pusher
from platypush.utils import set_timeout, clear_timeout from platypush.utils import set_timeout, clear_timeout
class TestLocal(unittest.TestCase): class TestLocal(unittest.TestCase):
""" Tests the full flow on a local backend by executing a command through
the shell.exec plugin and getting the output """
timeout = 5 timeout = 5
def setUp(self): def setUp(self):
@ -29,8 +30,8 @@ class TestLocal(unittest.TestCase):
def on_response(self): def on_response(self):
def _f(response): def _f(response):
logging.info("Received response: {}".format(response)) logging.info("Received response: {}".format(response))
clear_timeout()
self.assertEqual(response.output.strip(), 'ping') self.assertEqual(response.output.strip(), 'ping')
# os._exit(0)
return _f return _f
def on_timeout(self, msg): def on_timeout(self, msg):