from sqlalchemy.schema import CreateTable
from model import Foo
sql_url = 'sqlite:///:memory:'
db_engine = create_engine(sql_url)
table_sql = CreateTable(Foo.table).compile(db_engine)
self.assertTrue('CREATE TABLE foos' in str(table_sql))
SQLAlchemy printing raw SQL from create()