Weird travis fix for api

pull/923/head^2
Paulus Schoutsen 2015-12-14 23:27:22 -08:00
parent 027b891052
commit 4029d149fb
1 changed files with 4 additions and 5 deletions

View File

@ -422,11 +422,11 @@ class TestAPI(unittest.TestCase):
with closing(requests.get(_url(const.URL_API_STREAM),
stream=True, headers=HA_HEADERS)) as req:
self.assertEqual(listen_count + 1, self._listen_count())
data = self._stream_next_event(req)
self.assertEqual('ping', data)
self.assertEqual(listen_count + 1, self._listen_count())
hass.bus.fire('test_event')
hass.pool.block_till_done()
@ -441,12 +441,11 @@ class TestAPI(unittest.TestCase):
'restrict': 'test_event1,test_event3'}),
stream=True, headers=HA_HEADERS)) as req:
self.assertEqual(listen_count + 2, self._listen_count())
data = self._stream_next_event(req)
self.assertEqual('ping', data)
self.assertEqual(listen_count + 2, self._listen_count())
hass.bus.fire('test_event1')
hass.pool.block_till_done()
hass.bus.fire('test_event2')