Example #1
0
def test_missing_message():
    with pytest.raises(PromptParameterException):
        prompt([{
            'type': 'confirm',
            'name': 'continue',
            'default': True,
        }])
Example #2
0
def test_missing_name():
    with pytest.raises(PromptParameterException):
        prompt([{
            'type': 'confirm',
            'message': 'Do you want to continue?',
            'default': True,
        }])
Example #3
0
def test_missing_name():
    with pytest.raises(PromptParameterException):
        prompt([{
            "type": "confirm",
            "message": "Do you want to continue?",
            "default": True,
        }])
Example #4
0
def test_invalid_question_type():
    with pytest.raises(ValueError):
        prompt([{
            'type': 'mytype',
            'message': 'Do you want to continue?',
            'name': 'continue',
            'default': True,
        }])
Example #5
0
def test_invalid_question_type():
    with pytest.raises(ValueError):
        prompt([{
            "type": "mytype",
            "message": "Do you want to continue?",
            "name": "continue",
            "default": True,
        }])
Example #6
0
def test_missing_message():
    with pytest.raises(PromptParameterException):
        prompt([{"type": "confirm", "name": "continue", "default": True}])