File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,21 @@ def test_simple(self):
37
37
self .assertEqual (result [0 ], "remote_host" )
38
38
self .assertEqual (result [1 ], "remote_port" )
39
39
40
+ patch ('os.path.isdir' , MagicMock (return_value = False ))
41
+ def test_tabs (self ):
42
+ plugin = ReadOnlyTokenFile ('configfile' )
43
+
44
+ config = "testhost:\t remote_host:remote_port"
45
+ pyopen = mock_open (read_data = config )
46
+
47
+ with patch ("websockify.token_plugins.open" , pyopen ):
48
+ result = plugin .lookup ('testhost' )
49
+
50
+ pyopen .assert_called_once_with ('configfile' )
51
+ self .assertIsNotNone (result )
52
+ self .assertEqual (result [0 ], "remote_host" )
53
+ self .assertEqual (result [1 ], "remote_port" )
54
+
40
55
class JWSTokenTestCase (unittest .TestCase ):
41
56
def test_asymmetric_jws_token_plugin (self ):
42
57
plugin = JWTTokenApi ("./tests/fixtures/public.pem" )
You can’t perform that action at this time.
0 commit comments