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