diff options
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/constraints.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/sql/constraints.py b/test/sql/constraints.py index b7208532c..ab08c6d98 100644 --- a/test/sql/constraints.py +++ b/test/sql/constraints.py @@ -29,7 +29,16 @@ class ConstraintTest(TestBase, AssertsExecutionResults): ForeignKeyConstraint(['emp_id', 'emp_soc'], ['employees.id', 'employees.soc']) ) metadata.create_all() - + + def test_double_fk_usage_raises(self): + f = ForeignKey('b.id') + + self.assertRaises(exc.InvalidRequestError, Table, "a", metadata, + Column('x', Integer, f), + Column('y', Integer, f) + ) + + def test_circular_constraint(self): a = Table("a", metadata, Column('id', Integer, primary_key=True), |
