Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 04e88fece0
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (17 sloc) 0.641 kb
import unittest
import envoy
class SimpleTest(unittest.TestCase):
def test_input(self):
r = envoy.run("sed s/i/I/g", "Hi")
self.assertEqual(r.std_out.rstrip(), "HI")
self.assertEqual(r.status_code, 0)
def test_pipe(self):
r = envoy.run("echo -n 'hi'| tr [:lower:] [:upper:]")
self.assertEqual(r.std_out, "HI")
self.assertEqual(r.status_code, 0)
def test_timeout(self):
r = envoy.run('yes | head', timeout=1)
self.assertEqual(r.std_out, 'y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n')
self.assertEqual(r.status_code, 0)
if __name__ == "__main__":
unittest.main()
Jump to Line
Something went wrong with that request. Please try again.