Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

convert order_by arguments to columns before mapper creation

  • Loading branch information...
commit daacd307e9b4ddff3eefd0dc9275750aa617a1e9 1 parent 36d7533
Erik Janssens authored
Showing with 0 additions and 31 deletions.
  1. +0 −31 test/test_orm.py
View
31 test/test_orm.py
@@ -1,31 +0,0 @@
-from sqlalchemy import orm
-
-from camelot.test import ModelThreadTestCase
-
-class OrmCase( ModelThreadTestCase ):
- """Test the Declarative base classes"""
-
- def setUp(self):
- super( OrmCase, self ).setUp()
- from camelot.core.conf import settings
- from camelot.model import metadata
- metadata.create_all()
- self.session = orm.sessionmaker( bind = metadata.bind )()
-
- def test_batch_job( self ):
- from camelot.model.batch_job import BatchJob, BatchJobType
- from sqlalchemy.orm.attributes import InstrumentedAttribute
- #
- # are the relationship properties there
- #
- type_id_property = BatchJob.type_id
- self.assertTrue( isinstance( type_id_property, InstrumentedAttribute ) )
- type_property = BatchJob.type
- self.assertTrue( isinstance( type_property, InstrumentedAttribute ) )
- #
- # see if the queries work
- #
- type_mapper = orm.class_mapper( BatchJobType )
- type_query = self.session.query( BatchJobType )
- job_mapper = orm.class_mapper( BatchJob )
- job_query = self.session.query( BatchJob )
Please sign in to comment.
Something went wrong with that request. Please try again.