Fixed logs command

This commit is contained in:
shin- 2013-07-03 22:19:41 +02:00
parent 5ca13da482
commit b7e1ac7069
2 changed files with 3 additions and 3 deletions

View File

@ -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)))

View File

@ -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):