@@ -16,7 +16,7 @@ def test_empty(self):
16
16
config = ""
17
17
pyopen = mock_open (read_data = config )
18
18
19
- with patch ("websockify.token_plugins.open" , pyopen ):
19
+ with patch ("websockify.token_plugins.open" , pyopen , create = True ):
20
20
result = plugin .lookup ('testhost' )
21
21
22
22
pyopen .assert_called_once_with ('configfile' )
@@ -29,7 +29,7 @@ def test_simple(self):
29
29
config = "testhost: remote_host:remote_port"
30
30
pyopen = mock_open (read_data = config )
31
31
32
- with patch ("websockify.token_plugins.open" , pyopen ):
32
+ with patch ("websockify.token_plugins.open" , pyopen , create = True ):
33
33
result = plugin .lookup ('testhost' )
34
34
35
35
pyopen .assert_called_once_with ('configfile' )
@@ -44,7 +44,7 @@ def test_tabs(self):
44
44
config = "testhost:\t remote_host:remote_port"
45
45
pyopen = mock_open (read_data = config )
46
46
47
- with patch ("websockify.token_plugins.open" , pyopen ):
47
+ with patch ("websockify.token_plugins.open" , pyopen , create = True ):
48
48
result = plugin .lookup ('testhost' )
49
49
50
50
pyopen .assert_called_once_with ('configfile' )
0 commit comments