def test_to_dict_with_no_data(self):
class MyForm(BaseForm):
attribute1 = StringField()
with app.test_request_context():
form = MyForm()
result = form.to_dict()
assert_that(result, not_(has_key('attribute1')))
评论列表
文章目录