Ejemplo n.º 1
0
 def test_parse_param_line_with_dict(self):
     """ parse_param_line should accept a dict to configure itself """
     test_line = "test?==result#{'prompt':'would you like to do something?'}"
     value, config = self.inputs._parse_param_line(test_line)
     assert value == 'test'
     test_config = Input()
     test_config.prompt = 'would you like to do something?'
     test_config.is_secret = True
     test_config.default = 'result'
     assert config == test_config
Ejemplo n.º 2
0
 def test_parse_param_line_with_dict(self):
     """ parse_param_line should accept a dict to configure itself """
     test_line = "test?==result#{'prompt':'would you like to do something?'}"
     value, config = self.inputs._parse_param_line(test_line)
     assert value == "test"
     test_config = Input()
     test_config.prompt = "would you like to do something?"
     test_config.is_secret = True
     test_config.default = "result"
     assert config == test_config