From 4e53f1ee908949c0dcafd822bf05f9523e00d189 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 16 Jun 2012 13:38:10 +1200 Subject: Rename our tcpserver to netlib, expand to include client network functions. --- test/test_netlib.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/test_netlib.py (limited to 'test/test_netlib.py') diff --git a/test/test_netlib.py b/test/test_netlib.py new file mode 100644 index 00000000..2b76c9cf --- /dev/null +++ b/test/test_netlib.py @@ -0,0 +1,15 @@ +import cStringIO +from libmproxy import netlib + + +class TestFileLike: + def test_wrap(self): + s = cStringIO.StringIO("foobar\nfoobar") + s = netlib.FileLike(s) + s.flush() + assert s.readline() == "foobar\n" + assert s.readline() == "foobar" + # Test __getattr__ + assert s.isatty + + -- cgit v1.2.3