diff options
| author | Malik Diarra <malik.diarra@gmail.com> | 2014-08-07 21:50:49 +0200 |
|---|---|---|
| committer | Malik Diarra <malik.diarra@gmail.com> | 2014-08-09 21:43:32 +0200 |
| commit | ad8f921e969b6f735dc8e08d882c961dde78f2b1 (patch) | |
| tree | 02ee67047adc575ec337502f06ba4469b40861b8 /test/engine | |
| parent | cca4d8fc73df042e938447ec0bc990be28c4fb11 (diff) | |
| download | sqlalchemy-ad8f921e969b6f735dc8e08d882c961dde78f2b1.tar.gz | |
Providing an autoload_with info automatically sets autoload to True
Diffstat (limited to 'test/engine')
| -rw-r--r-- | test/engine/test_reflection.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py index 03b2033d5..807abc84f 100644 --- a/test/engine/test_reflection.py +++ b/test/engine/test_reflection.py @@ -65,6 +65,22 @@ class ReflectionTest(fixtures.TestBase, ComparesTables): self.assert_tables_equal(addresses, reflected_addresses) @testing.provide_metadata + def test_autoload_with_imply_autoload(self,): + meta = self.metadata + t = Table( + 't', + meta, + Column('id', sa.Integer, primary_key=True), + Column('x', sa.String(20)), + Column('y', sa.Integer)) + meta.create_all() + + meta2 = MetaData() + reflected_t = Table('t', meta2, + autoload_with=testing.db) + self.assert_tables_equal(t, reflected_t) + + @testing.provide_metadata def test_two_foreign_keys(self): meta = self.metadata Table( |
