Example #1
0
 def test_can_replace_default_prompt_for_password_input(self):
     handler = InputHandler()
     handler.start(password_prompt='a')
     handler.input_password()
     handler.input_password('b')
     handler.end()
     self.m2.assert_any_call('a')
     self.m2.assert_any_call('b')
Example #2
0
 def test_can_set_several_default_prompts_for_inputs(self):
     handler = InputHandler()
     handler.start(number_prompt='a',
                   password_prompt='b',
                   string_prompt='c')
     handler.input_number()
     handler.input_password()
     handler.input_string()
     handler.end()
     self.m1.assert_any_call('a')
     self.m1.assert_any_call('c')
     self.m2.assert_called_once_with('b')
Example #3
0
 def test_can_set_nondefault_prompt_for_password_input(self):
     handler = InputHandler()
     handler.start()
     handler.input_password('a')
     handler.end()
     self.m2.assert_called_once_with('a')