<s> from mongoengine import connect , fields <EOL> from mongoengine . document import Document <EOL> from wtforms import fields as form_fields , validators <EOL> from wtforms . form import Form <EOL> from flask_views . tests . functional . base import BaseTestCase <EOL> class BaseMongoTestCase ( BaseTestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> super ( BaseMongoTestCase , self ) . setUp ( ) <EOL> self . db = connect ( '<STR_LIT>' ) <EOL> class TestDocument ( Document ) : <EOL> username = fields . StringField ( <EOL> verbose_name = '<STR_LIT>' , <EOL> required = True , <EOL> ) <EOL> name = fields . StringField ( <EOL> verbose_name = '<STR_LIT:Name>' , <EOL> required = True , <EOL> ) <EOL> class TestForm ( Form ) : <EOL> username = form_fields . TextField ( <EOL> '<STR_LIT>' , [ validators . required ( ) ] ) <EOL> name = form_fields . TextField ( <EOL> '<STR_LIT:Name>' , [ validators . required ( ) ] ) <EOL> self . TestDocument = TestDocument <EOL> self . TestForm = TestForm <EOL> def tearDown ( self ) : <EOL> self . TestDocument . drop_collection ( ) </s>
