Пример #1
0
def test_basic_question_copy__no_args__confirm_same_message(mocker):
    user_io = mocker.patch("columbo._interaction.user_io")

    question = BasicQuestion(SOME_NAME, SOME_STRING, SOME_DEFAULT)
    question.ask(SOME_ANSWERS, no_user_input=True)

    question.copy().ask(SOME_ANSWERS, no_user_input=True)

    calls = user_io.ask.mock_calls
    assert len(calls) == 2
    assert calls[0] == calls[1]
Пример #2
0
def test_basic_question_copy__new_instance():
    original = BasicQuestion(SOME_NAME, SOME_STRING, SOME_DEFAULT)

    copy = original.copy()

    assert copy is not original