File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,26 @@ def test_no_state_ini_file_or_state_dir(
68
68
TabPyApp (None )
69
69
self .assertEqual (len (mock_os .makedirs .mock_calls ), 1 )
70
70
71
+ @patch ('builtins.input' , return_value = 'y' )
72
+ @patch ("tabpy.tabpy_server.app.app.os" )
73
+ @patch ("tabpy.tabpy_server.app.app.os.path.exists" , return_value = False )
74
+ @patch ("tabpy.tabpy_server.app.app.PythonServiceHandler" )
75
+ @patch ("tabpy.tabpy_server.app.app._get_state_from_file" )
76
+ @patch ("tabpy.tabpy_server.app.app.TabPyState" )
77
+ def test_handle_configuration_without_authentication (
78
+ self ,
79
+ mock_tabpy_state ,
80
+ mock_get_state_from_file ,
81
+ mock_psws ,
82
+ mock_os_path_exists ,
83
+ mock_os ,
84
+ mock_input ,
85
+ ):
86
+ TabPyApp (None )
87
+ mock_input .assert_not_called ()
88
+
89
+ TabPyApp (None , False )
90
+ mock_input .assert_called ()
71
91
72
92
class TestPartialConfigFile (unittest .TestCase ):
73
93
def setUp (self ):
You can’t perform that action at this time.
0 commit comments