summaryrefslogtreecommitdiff
path: root/selftest/tests/test_socket_wrapper.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-04 01:36:16 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-04 18:02:06 +0100
commit0cfb8e033c334f7685a6f566b0153b4e435a229d (patch)
treee12887693248c870b36c67b467094837e4563db9 /selftest/tests/test_socket_wrapper.py
parentadbd55ea5580d5a6a44269f26f7eb6481a40532d (diff)
downloadsamba-0cfb8e033c334f7685a6f566b0153b4e435a229d.tar.gz
samba-0cfb8e033c334f7685a6f566b0153b4e435a229d.tar.bz2
samba-0cfb8e033c334f7685a6f566b0153b4e435a229d.zip
selftest.socket_wrapper: Add basic unit tests.
Diffstat (limited to 'selftest/tests/test_socket_wrapper.py')
-rw-r--r--selftest/tests/test_socket_wrapper.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/selftest/tests/test_socket_wrapper.py b/selftest/tests/test_socket_wrapper.py
index 0bb2180ff6..1ebdf94de1 100644
--- a/selftest/tests/test_socket_wrapper.py
+++ b/selftest/tests/test_socket_wrapper.py
@@ -18,3 +18,18 @@
# MA 02110-1301, USA.
"""Tests for selftest/socket_wrapper."""
+
+from selftest import socket_wrapper
+
+import os
+import unittest
+
+class SocketWrapperTests(unittest.TestCase):
+
+ def test_setup_pcap(self):
+ socket_wrapper.setup_pcap("somefile")
+ self.assertEquals("somefile", os.environ["SOCKET_WRAPPER_PCAP_FILE"])
+
+ def test_set_default_iface(self):
+ socket_wrapper.set_default_iface(4)
+ self.assertEquals("4", os.environ["SOCKET_WRAPPER_DEFAULT_IFACE"])