def test_validate_input_non_numeric_value(monkeypatch, caplog): monkeypatch.setattr("builtins.input", lambda x: 'asdfa') assert album.validate_input() == -1 assert caplog.record_tuples == [("root", logging.WARNING, INPUT_WARNING_MESSAGE)]
def test_validate_input_greater_than_one_hundred(monkeypatch, caplog): monkeypatch.setattr("builtins.input", lambda x: '101') assert album.validate_input() == -1 assert caplog.record_tuples == [("root", logging.WARNING, INPUT_WARNING_MESSAGE)]
def test_validate_input_equal_to_one_hundred(monkeypatch): monkeypatch.setattr("builtins.input", lambda x: '100') assert album.validate_input() == 100
def test_validate_input_less_than_one_hundred(monkeypatch): monkeypatch.setattr("builtins.input", lambda x: '99') assert album.validate_input() == 99
def test_validate_input_between_one_and_one_hundred(monkeypatch): monkeypatch.setattr("builtins.input", lambda x: '46') assert album.validate_input() == 46
def test_validate_input_greater_than_one(monkeypatch): monkeypatch.setattr("builtins.input", lambda x: '2') assert album.validate_input() == 2