From d522d1e1bd1c4ce340178c5bba569ecfe443ffe4 Mon Sep 17 00:00:00 2001 From: Brian May Date: Wed, 16 Mar 2016 17:38:33 +1100 Subject: [PATCH] Split client/server tests This allows disabling all client tests using a conftest.py file, if for example #56 gets merged and the server supports more python versions then the server. The server side tests are very incomplete. --- sshuttle/tests/{ => client}/test_firewall.py | 0 sshuttle/tests/{ => client}/test_helpers.py | 0 sshuttle/tests/{ => client}/test_methods_nat.py | 0 sshuttle/tests/{ => client}/test_methods_pf.py | 0 sshuttle/tests/{ => client}/test_methods_tproxy.py | 0 sshuttle/tests/server/test_server.py | 7 +++++++ 6 files changed, 7 insertions(+) rename sshuttle/tests/{ => client}/test_firewall.py (100%) rename sshuttle/tests/{ => client}/test_helpers.py (100%) rename sshuttle/tests/{ => client}/test_methods_nat.py (100%) rename sshuttle/tests/{ => client}/test_methods_pf.py (100%) rename sshuttle/tests/{ => client}/test_methods_tproxy.py (100%) create mode 100644 sshuttle/tests/server/test_server.py diff --git a/sshuttle/tests/test_firewall.py b/sshuttle/tests/client/test_firewall.py similarity index 100% rename from sshuttle/tests/test_firewall.py rename to sshuttle/tests/client/test_firewall.py diff --git a/sshuttle/tests/test_helpers.py b/sshuttle/tests/client/test_helpers.py similarity index 100% rename from sshuttle/tests/test_helpers.py rename to sshuttle/tests/client/test_helpers.py diff --git a/sshuttle/tests/test_methods_nat.py b/sshuttle/tests/client/test_methods_nat.py similarity index 100% rename from sshuttle/tests/test_methods_nat.py rename to sshuttle/tests/client/test_methods_nat.py diff --git a/sshuttle/tests/test_methods_pf.py b/sshuttle/tests/client/test_methods_pf.py similarity index 100% rename from sshuttle/tests/test_methods_pf.py rename to sshuttle/tests/client/test_methods_pf.py diff --git a/sshuttle/tests/test_methods_tproxy.py b/sshuttle/tests/client/test_methods_tproxy.py similarity index 100% rename from sshuttle/tests/test_methods_tproxy.py rename to sshuttle/tests/client/test_methods_tproxy.py diff --git a/sshuttle/tests/server/test_server.py b/sshuttle/tests/server/test_server.py new file mode 100644 index 0000000..34ad2a7 --- /dev/null +++ b/sshuttle/tests/server/test_server.py @@ -0,0 +1,7 @@ +import sshuttle.server + + +def test__ipmatch(): + assert sshuttle.server._ipmatch("1.2.3.4") is not None + assert sshuttle.server._ipmatch("::1") is not None + assert sshuttle.server._ipmatch("42 Example Street, Melbourne") is None