summaryrefslogtreecommitdiff
path: root/selftest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'selftest/tests')
-rw-r--r--selftest/tests/__init__.py4
-rw-r--r--selftest/tests/test_socket_wrapper.py15
2 files changed, 16 insertions, 3 deletions
diff --git a/selftest/tests/__init__.py b/selftest/tests/__init__.py
index 427c7cee1e..1e6b192d26 100644
--- a/selftest/tests/__init__.py
+++ b/selftest/tests/__init__.py
@@ -23,10 +23,8 @@ import unittest
def test_suite():
result = unittest.TestSuite()
- names = ['socketwrapper']
+ names = ['socket_wrapper']
module_names = ['selftest.tests.test_' + name for name in names]
loader = unittest.TestLoader()
result.addTests(loader.loadTestsFromNames(module_names))
- from dulwich.tests.compat import test_suite as compat_test_suite
- result.addTests(compat_test_suite())
return result
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"])