diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-28 17:05:50 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-28 17:05:50 -0400 |
commit | 22ba1c43b792953ae6f791512d276739c8c09eae (patch) | |
tree | bdf9f639b01426a8a2e1c8c61d35533026dd4265 /test/sql/test_constraints.py | |
parent | 27913554a85c308d81e6c018669d0246ceecc639 (diff) | |
download | sqlalchemy-22ba1c43b792953ae6f791512d276739c8c09eae.tar.gz |
-whitespace bonanza, contd
Diffstat (limited to 'test/sql/test_constraints.py')
-rw-r--r-- | test/sql/test_constraints.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/sql/test_constraints.py b/test/sql/test_constraints.py index fcc6c085e..2869839dc 100644 --- a/test/sql/test_constraints.py +++ b/test/sql/test_constraints.py @@ -194,7 +194,7 @@ class ConstraintTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled ('sometable', 'this_name_alsois_long', 'ix_sometable_t_3cf1'), ]: - t1 = Table(tname, MetaData(), + t1 = Table(tname, MetaData(), Column(cname, Integer, index=True), ) ix1 = list(t1.indexes)[0] @@ -213,24 +213,24 @@ class ConstraintTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled assert_raises( exc.IdentifierError, schema.CreateIndex(Index( - "this_other_name_is_too_long_for_what_were_doing", + "this_other_name_is_too_long_for_what_were_doing", t1.c.c)).compile, dialect=dialect ) def test_index_declartion_inline(self): - t1 = Table('t1', metadata, + t1 = Table('t1', metadata, Column('x', Integer), Column('y', Integer), Index('foo', 'x', 'y') ) self.assert_compile( - schema.CreateIndex(list(t1.indexes)[0]), + schema.CreateIndex(list(t1.indexes)[0]), "CREATE INDEX foo ON t1 (x, y)" ) def test_index_asserts_cols_standalone(self): - t1 = Table('t1', metadata, + t1 = Table('t1', metadata, Column('x', Integer) ) t2 = Table('t2', metadata, @@ -244,7 +244,7 @@ class ConstraintTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled ) def test_index_asserts_cols_inline(self): - t1 = Table('t1', metadata, + t1 = Table('t1', metadata, Column('x', Integer) ) assert_raises_message( @@ -384,7 +384,7 @@ class ConstraintCompilationTest(fixtures.TestBase, AssertsCompiledSQL): def test_multiple(self): m = MetaData() - foo = Table("foo", m, + foo = Table("foo", m, Column('id', Integer, primary_key=True), Column('bar', Integer, primary_key=True) ) @@ -433,11 +433,11 @@ class ConstraintCompilationTest(fixtures.TestBase, AssertsCompiledSQL): m.drop_all(e) e.assert_sql([ - 'CREATE TABLE t (a INTEGER)', - 'CREATE TABLE t2 (a INTEGER, b INTEGER, CONSTRAINT fk_tb FOREIGN KEY(b) REFERENCES t (a))', - 'ALTER TABLE t2 ADD CONSTRAINT fk_ta FOREIGN KEY(a) REFERENCES t (a)', - 'ALTER TABLE t2 DROP CONSTRAINT fk_ta', - 'DROP TABLE t2', + 'CREATE TABLE t (a INTEGER)', + 'CREATE TABLE t2 (a INTEGER, b INTEGER, CONSTRAINT fk_tb FOREIGN KEY(b) REFERENCES t (a))', + 'ALTER TABLE t2 ADD CONSTRAINT fk_ta FOREIGN KEY(a) REFERENCES t (a)', + 'ALTER TABLE t2 DROP CONSTRAINT fk_ta', + 'DROP TABLE t2', 'DROP TABLE t' ]) @@ -456,7 +456,7 @@ class ConstraintCompilationTest(fixtures.TestBase, AssertsCompiledSQL): ) constraint = CheckConstraint('a < b',name="my_test_constraint", - deferrable=True,initially='DEFERRED', + deferrable=True,initially='DEFERRED', table=t) |