summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_websocketproxy.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_websocketproxy.py b/tests/test_websocketproxy.py
index 92fd5db..6e34ac0 100644
--- a/tests/test_websocketproxy.py
+++ b/tests/test_websocketproxy.py
@@ -93,6 +93,16 @@ class ProxyRequestHandlerTestCase(unittest.TestCase):
self.assertEqual(host, "some host")
self.assertEqual(port, "some port")
+ def test_get_target_unix_socket(self):
+ class TestPlugin(token_plugins.BasePlugin):
+ def lookup(self, token):
+ return ("unix_socket", "/tmp/socket")
+
+ _, socket = self.handler.get_target(
+ TestPlugin(None), self.handler.path)
+
+ self.assertEqual(socket, "/tmp/socket")
+
def test_get_target_raises_error_on_unknown_token(self):
class TestPlugin(token_plugins.BasePlugin):
def lookup(self, token):