We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed95548 commit 2c6ab5dCopy full SHA for 2c6ab5d
1 file changed
tests/test_codegen.py
@@ -1234,15 +1234,15 @@ class Simple(Base):
1234
metadata_ = Column('metadata', String)
1235
"""
1236
1237
- def test_mysql_timestamp(self):
1238
- self.metadata.bind = create_engine('mysql+oursql://foo')
1239
- Table(
1240
- 'simple', self.metadata,
1241
- Column('id', INTEGER, primary_key=True),
1242
- Column('timestamp', mysql.TIMESTAMP)
1243
- )
1244
-
1245
- assert self.generate_code() == """\
+
+def test_mysql_timestamp(metadata):
+ Table(
+ 'simple', metadata,
+ Column('id', INTEGER, primary_key=True),
+ Column('timestamp', mysql.TIMESTAMP)
+ )
+ assert generate_code(metadata) == """\
1246
# coding: utf-8
1247
from sqlalchemy import Column, Integer, TIMESTAMP
1248
from sqlalchemy.ext.declarative import declarative_base
0 commit comments