Skip to content

Commit 32037f3

Browse files
committed
Allow min_length=0 for Ascii and Text column types
1 parent 227af86 commit 32037f3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Bug Fixes
1313
* Bug when subclassing AyncoreConnection (PYTHON-827)
1414
* Error at cleanup when closing the asyncore connections (PYTHON-829)
1515
* Fix sites where `sessions` can change during iteration (PYTHON-793)
16+
* cqlengine: allow min_length=0 for Ascii and Text column types (PYTHON-735)
1617

1718
3.11.0
1819
======

tests/integration/cqlengine/columns/test_validation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,10 @@ class TestAscii(BaseCassEngTestCase):
532532

533533
def test_min_length(self):
534534
""" Test arbitrary minimal lengths requirements. """
535+
535536
Ascii(min_length=0).validate('')
537+
Ascii(min_length=0, required=True).validate('')
538+
536539
Ascii(min_length=0).validate(None)
537540
Ascii(min_length=0).validate('kevin')
538541

@@ -656,7 +659,10 @@ class TestText(BaseCassEngTestCase):
656659

657660
def test_min_length(self):
658661
""" Test arbitrary minimal lengths requirements. """
662+
659663
Text(min_length=0).validate('')
664+
Text(min_length=0, required=True).validate('')
665+
660666
Text(min_length=0).validate(None)
661667
Text(min_length=0).validate('blake')
662668

0 commit comments

Comments
 (0)