Fix StaticField + tests for StaticField and unset optional TextField
This commit is contained in:
parent
558e3fd232
commit
0bd82e09c4
4 changed files with 20 additions and 10 deletions
|
@ -33,6 +33,11 @@ class TestTextField(unittest.TestCase):
|
|||
self.assertEqual(len(data), field.max_length)
|
||||
self.assertEqual(data, b'HELLO,')
|
||||
|
||||
def testStringUnsetOptional(self):
|
||||
field = TextField(max_length=6, required=False)
|
||||
field.validate()
|
||||
self.assertEqual(field.get_data(), b' ' * 6)
|
||||
|
||||
class TestStaticField(unittest.TestCase):
|
||||
def test_static_field(self):
|
||||
field = StaticField(value='TEST')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue