def test_validate_boolean_invalid(): with pytest.raises(ValidationError) as exception_info: validate_boolean("FOO") assert 'FOO must be either "true" or "false"' in str(exception_info)
def test_validate_boolean_truthy(): validate_boolean("true") validate_boolean("TRUE") validate_boolean("T") validate_boolean("1") validate_boolean("Y") validate_boolean("YES")
def test_validate_boolean_falsy(): validate_boolean("false") validate_boolean("FALSE") validate_boolean("F") validate_boolean("0") validate_boolean("N") validate_boolean("No")
def test_validate_boolean_falsy(): validate_boolean('false') validate_boolean('FALSE') validate_boolean('F') validate_boolean('0') validate_boolean('N') validate_boolean('No')
def test_validate_boolean_truthy(): validate_boolean('true') validate_boolean('TRUE') validate_boolean('T') validate_boolean('1') validate_boolean('Y') validate_boolean('YES')