Ejemplo n.º 1
0
    def test_get_option_with_hyphen_input(self):
        # Assemble
        def mock_input(msg):
            return '-'

        expected = '-'

        # Act
        actual = get_option(mock_input)

        # Assert
        assert actual == expected
Ejemplo n.º 2
0
    def test_get_option_with_word_input(self):
        # Assemble
        def mock_input(msg):
            return 'two'

        expected = 'two'

        # Act
        actual = get_option(mock_input)

        # Assert
        assert actual == expected
Ejemplo n.º 3
0
    def test_get_option_with_bool_input(self):
        # Assemble
        def mock_input(msg):
            return 'True'

        expected = 'True'

        # Act
        actual = get_option(mock_input)

        # Assert
        assert actual == expected
Ejemplo n.º 4
0
    def test_get_option_with_number_input(self):
        # Assemble
        def mock_input(msg):
            return '2'

        expected = '2'

        # Act
        actual = get_option(mock_input)

        # Assert
        assert actual == expected