diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-07 19:49:25 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-01-07 19:49:25 -0500 |
commit | fd136760391712fc277d2cca73f6400f630d9e58 (patch) | |
tree | f6aa10793d3605249d374c04dad2c9ae8ceeed44 /test/dialect/test_sqlite.py | |
parent | 3ff1d0a2b11afa3bf067ea6cd151b5e555963781 (diff) | |
download | sqlalchemy-fd136760391712fc277d2cca73f6400f630d9e58.tar.gz |
that's not a "name=0", that's a counter. so name is None unconditonally.
[ticket:2348]
Diffstat (limited to 'test/dialect/test_sqlite.py')
-rw-r--r-- | test/dialect/test_sqlite.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index ed9d7e493..7a5953654 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -732,17 +732,23 @@ class ReflectFKConstraintTest(fixtures.TestBase): __only_on__ = 'sqlite' def setup(self): - testing.db.execute("CREATE TABLE a (id INTEGER PRIMARY KEY)") + testing.db.execute("CREATE TABLE a1 (id INTEGER PRIMARY KEY)") + testing.db.execute("CREATE TABLE a2 (id INTEGER PRIMARY KEY)") testing.db.execute("CREATE TABLE b (id INTEGER PRIMARY KEY, " - "FOREIGN KEY(id) REFERENCES a(id))") + "FOREIGN KEY(id) REFERENCES a1(id)," + "FOREIGN KEY(id) REFERENCES a2(id)" + ")") testing.db.execute("CREATE TABLE c (id INTEGER, " "CONSTRAINT bar PRIMARY KEY(id)," - "CONSTRAINT foo FOREIGN KEY(id) REFERENCES a(id))") + "CONSTRAINT foo1 FOREIGN KEY(id) REFERENCES a1(id)," + "CONSTRAINT foo2 FOREIGN KEY(id) REFERENCES a2(id)" + ")") def teardown(self): testing.db.execute("drop table c") testing.db.execute("drop table b") - testing.db.execute("drop table a") + testing.db.execute("drop table a1") + testing.db.execute("drop table a2") def test_name_is_none(self): # and not "0" @@ -750,7 +756,7 @@ class ReflectFKConstraintTest(fixtures.TestBase): b = Table('b', meta, autoload=True, autoload_with=testing.db) eq_( [con.name for con in b.constraints], - [None, None] + [None, None, None] ) def test_name_not_none(self): |