summaryrefslogtreecommitdiff
path: root/test/orm/_fixtures.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-06-10 21:18:24 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-06-10 21:18:24 +0000
commit45cec095b4904ba71425d2fe18c143982dd08f43 (patch)
treeaf5e540fdcbf1cb2a3337157d69d4b40be010fa8 /test/orm/_fixtures.py
parent698a3c1ac665e7cd2ef8d5ad3ebf51b7fe6661f4 (diff)
downloadsqlalchemy-45cec095b4904ba71425d2fe18c143982dd08f43.tar.gz
- unit tests have been migrated from unittest to nose.
See README.unittests for information on how to run the tests. [ticket:970]
Diffstat (limited to 'test/orm/_fixtures.py')
-rw-r--r--test/orm/_fixtures.py43
1 files changed, 16 insertions, 27 deletions
diff --git a/test/orm/_fixtures.py b/test/orm/_fixtures.py
index f036b92b2..14709ec43 100644
--- a/test/orm/_fixtures.py
+++ b/test/orm/_fixtures.py
@@ -1,7 +1,9 @@
-from testlib.sa import MetaData, Table, Column, Integer, String, ForeignKey
-from testlib.sa.orm import attributes
-from testlib.testing import fixture
-from orm import _base
+from sqlalchemy import MetaData, Integer, String, ForeignKey
+from sqlalchemy.test.schema import Table
+from sqlalchemy.test.schema import Column
+from sqlalchemy.orm import attributes
+from sqlalchemy.test.testing import fixture
+from test.orm import _base
__all__ = ()
@@ -227,34 +229,21 @@ class FixtureTest(_base.MappedTest):
Address=Address,
Dingaling=Dingaling)
- def setUpAll(self):
- assert not hasattr(self, 'refresh_data')
- assert not hasattr(self, 'only_tables')
- #refresh_data = False
- #only_tables = False
-
- #if type(self) is not FixtureTest:
- # setattr(type(self), 'classes', _base.adict(self.classes))
-
- #if self.run_setup_classes:
- # for cls in self.classes.values():
- # self.register_class(cls)
- super(FixtureTest, self).setUpAll()
-
- #if not self.only_tables and self.keep_data:
- # _registry.load()
-
- def define_tables(self, metadata):
+ @classmethod
+ def define_tables(cls, metadata):
pass
- def setup_classes(self):
- for cls in self.fixture_classes.values():
- self.register_class(cls)
+ @classmethod
+ def setup_classes(cls):
+ for cl in cls.fixture_classes.values():
+ cls.register_class(cl)
- def setup_mappers(self):
+ @classmethod
+ def setup_mappers(cls):
pass
- def insert_data(self):
+ @classmethod
+ def insert_data(cls):
_load_fixtures()