Source code for fields.test_loglevel
import pytest
from argschema import ArgSchemaParser
import marshmallow as mm
[docs]def test_option_list():
input_data = {
'log_level': 'WARNING'
}
ArgSchemaParser(
input_data=input_data, args=[])
[docs]def test_bad_option():
input_data = {
'log_level': 'NOTALEVEL'
}
with pytest.raises(mm.ValidationError):
ArgSchemaParser(
input_data=input_data, args=[])