Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
2efb4f5be0
commit
7544580b4b
6 changed files with 42 additions and 3 deletions
20
tests/unit/progress_stream_test.py
Normal file
20
tests/unit/progress_stream_test.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import
|
||||
from tests import unittest
|
||||
|
||||
import mock
|
||||
from six import StringIO
|
||||
|
||||
from fig import progress_stream
|
||||
|
||||
|
||||
class ProgressStreamTestCase(unittest.TestCase):
|
||||
|
||||
def test_stream_output(self):
|
||||
output = [
|
||||
'{"status": "Downloading", "progressDetail": {"current": '
|
||||
'31019763, "start": 1413653874, "total": 62763875}, '
|
||||
'"progress": "..."}',
|
||||
]
|
||||
events = progress_stream.stream_output(output, StringIO())
|
||||
self.assertEqual(len(events), 1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue