Refactor tests
This commit is contained in:
		| @@ -1,11 +1,14 @@ | ||||
| import sqlalchemy as sa | ||||
| from sqlalchemy.ext.declarative import declarative_base | ||||
|  | ||||
| from sqlalchemy_utils import get_columns | ||||
| from tests import TestCase | ||||
|  | ||||
|  | ||||
| class TestGetColumns(TestCase): | ||||
|     def create_models(self): | ||||
|         class Building(self.Base): | ||||
| class TestGetColumns(object): | ||||
|     def setup_method(self, method): | ||||
|         Base = declarative_base() | ||||
|  | ||||
|         class Building(Base): | ||||
|             __tablename__ = 'building' | ||||
|             id = sa.Column('_id', sa.Integer, primary_key=True) | ||||
|             name = sa.Column('_name', sa.Unicode(255)) | ||||
|   | ||||
| @@ -3,13 +3,17 @@ try: | ||||
| except ImportError: | ||||
|     from ordereddict import OrderedDict | ||||
| import sqlalchemy as sa | ||||
| from sqlalchemy.ext.declarative import declarative_base | ||||
|  | ||||
| from sqlalchemy_utils import get_primary_keys | ||||
| from tests import TestCase | ||||
|  | ||||
|  | ||||
| class TestGetPrimaryKeys(TestCase): | ||||
|     def create_models(self): | ||||
|         class Building(self.Base): | ||||
| class TestGetPrimaryKeys(object): | ||||
|     def setup_method(self, method): | ||||
|         Base = declarative_base() | ||||
|  | ||||
|         class Building(Base): | ||||
|             __tablename__ = 'building' | ||||
|             id = sa.Column('_id', sa.Integer, primary_key=True) | ||||
|             name = sa.Column('_name', sa.Unicode(255)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Konsta Vesterinen
					Konsta Vesterinen