Test suite runs and passes!
[zzz-floof.git] / floof / tests / __init__.py
index 68cb322..f7621ed 100644 (file)
@@ -41,45 +41,40 @@ conf = appconfig('config:' + test_file)
 load_environment(conf.global_conf, conf.local_conf)
 environ = {}
 
-engine = engine_from_config(config, 'sqlalchemy.')
-model.init_model(engine)
-metadata = elixir.metadata
-Session = elixir.session = meta.Session
+engine = elixir.metadata.bind
 
-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():
+    """Setup for the entire test suite."""
+    setup_all(create_tables=True)
     pass
 
 def teardown():
+    """Teardown for the entire test suite."""
+    drop_all(engine)
     pass
 
+
 class TestModel(TestCase):
     def setUp(self):
-        setup_all(True)
-    
+        pass
+
     def tearDown(self):
-        drop_all(engine)
+        pass
 
 
 class TestController(TestCase):
 
+    def setUp(self):
+        """Setup for a controller test class.
+        """
+        pass
+
+    def tearDown(self):
+        """Teardown for a controller test class.
+        """
+        pass
+
     def __init__(self, *args, **kwargs):
         if pylons.test.pylonsapp:
             wsgiapp = pylons.test.pylonsapp