diff --git a/secop/datatypes.py b/secop/datatypes.py index 3f76544..885ccd2 100644 --- a/secop/datatypes.py +++ b/secop/datatypes.py @@ -260,7 +260,7 @@ class StringType(DataType): minsize = None maxsize = None - def __init__(self, maxsize=None, minsize=0): + def __init__(self, maxsize=255, minsize=0): if maxsize is None: raise ValueError('StringType needs a maximum bytes count!') minsize, maxsize = min(minsize, maxsize), max(minsize, maxsize) diff --git a/test/test_datatypes.py b/test/test_datatypes.py index 8b39adc..b8c9143 100644 --- a/test/test_datatypes.py +++ b/test/test_datatypes.py @@ -145,8 +145,7 @@ def test_BLOBType(): def test_StringType(): # test constructor catching illegal arguments - with pytest.raises(ValueError): - dt = StringType() + dt = StringType() dt = StringType(12) assert dt.as_json == ['string', 12]