Changeset 473 for elixir/trunk

Show
Ignore:
Timestamp:
09/27/09 21:03:03 (3 years ago)
Author:
ged
Message:

move autoload_mixed test with the other autoload tests

Location:
elixir/trunk/tests
Files:
1 removed
1 modified

Legend:

Unmodified
Added
Removed
  • elixir/trunk/tests/test_autoload.py

    r472 r473  
    267267 
    268268        setup_all() 
     269 
     270    def test_autoload_mixed(self): 
     271        # mixed autoloaded entity with a non autoloaded one 
     272        conn = metadata.bind.connect() 
     273        conn.execute("CREATE TABLE user (" 
     274                     "user_id INTEGER PRIMARY KEY AUTOINCREMENT)") 
     275        conn.close() 
     276 
     277        class User(Entity): 
     278            using_options(tablename='user', autoload=True) 
     279 
     280        class Item(Entity): 
     281            using_options(autoload=False) 
     282 
     283            owner = ManyToOne('User') 
     284 
     285        setup_all(True) 
     286 
     287        colname = Item.table.c['owner_user_id'].foreign_keys[0].column.name 
     288        assert colname == 'user_id' 
     289