mirror of https://github.com/docker/docker-py.git
Fixed logs command
This commit is contained in:
parent
5ca13da482
commit
b7e1ac7069
|
@ -231,7 +231,7 @@ class Client(requests.Session):
|
|||
}
|
||||
u = self._url("/containers/{0}/attach".format(container))
|
||||
res = self.post(u, None, params=params)
|
||||
return res.raw
|
||||
return res.text
|
||||
|
||||
def port(self, container, private_port):
|
||||
res = self.get(self._url("/containers/{0}/json".format(container)))
|
||||
|
|
|
@ -132,14 +132,14 @@ class TestLogs(BaseTestCase):
|
|||
def runTest(self):
|
||||
snippet = 'Flowering Nights (Sakuya Iyazoi)'
|
||||
container = self.client.create_container('busybox',
|
||||
['echo', '-n', '"{0}"'.format(snippet)])
|
||||
['echo', '-n', '{0}'.format(snippet)])
|
||||
id = container['Id']
|
||||
self.client.start(id)
|
||||
self.tmp_containers.append(id)
|
||||
exitcode = self.client.wait(id)
|
||||
self.assertEqual(exitcode, 0)
|
||||
logs = self.client.logs(id)
|
||||
self.assertEqual(logs.read(), snippet)
|
||||
self.assertEqual(logs, snippet)
|
||||
|
||||
class TestDiff(BaseTestCase):
|
||||
def runTest(self):
|
||||
|
|
Loading…
Reference in New Issue