forked from docker/compose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Daniel Nephin <[email protected]>
- Loading branch information
Showing
6 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import unicode_literals | ||
from __future__ import absolute_import | ||
import os | ||
|
||
import mock | ||
from tests import unittest | ||
|
||
from fig.cli import docker_client | ||
|
||
|
||
class DockerClientTestCase(unittest.TestCase): | ||
|
||
def test_docker_client_no_home(self): | ||
with mock.patch.dict(os.environ): | ||
del os.environ['HOME'] | ||
docker_client.docker_client() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ commands = | |
[flake8] | ||
# ignore line-length for now | ||
ignore = E501,E203 | ||
exclude = fig/packages |