+engine = engine_from_config(config, 'sqlalchemy.')
+model.init_model(engine)
+metadata = elixir.metadata
+Session = elixir.session = meta.Session
+
+class Individual(Entity):
+ """Table 'Individual'.
+
+ >>> me = Individual('Groucho')
+
+ # 'name' field is converted to lowercase
+ >>> me.name
+ 'groucho'
+ """
+ name = Field(String(20), unique=True)
+ favorite_color = Field(String(20))
+
+ def __init__(self, name, favorite_color=None):
+ self.name = str(name).lower()
+ self.favorite_color = favorite_color
+
+setup_all()
+
+def setup():
+ pass
+
+def teardown():
+ pass
+
+class TestModel(TestCase):
+ def setUp(self):
+ setup_all(True)
+
+ def tearDown(self):
+ drop_all(engine)
+
+