Changes between Initial Version and Version 2 of Ticket #614


Ignore:
Timestamp:
Jan 31, 2013, 7:40:14 PM (11 years ago)
Author:
Elrond
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #614 – Description

    initial v2  
    11We need the ability to load different app configurations for different types of tests.
    22
    3 This sounds easier than it is; technically we should be able to just have the function in mediagoblin.tests.tools that loads the mediagoblin app just use a different configuration that we specify.  However, it isn't that easy for SQLAlchemy reasons.  We currently use the "cascading delete" feature in SQLAlchemy... however, if we load one "application" that has the video media type enabled, then that imports and sees the VideoData table.  If we create another mediagoblin app instance without the video media type enabled, sqlalchemy will try to delete related entries during a cascading delete from the videodata table but won't be able to and will thus throw an exception.
     3This sounds easier than it is; technically we should be able to just have the function in mediagoblin.tests.tools that loads the mediagoblin app ({{{get_app}}}) just use a different configuration that we specify.  However, it isn't that easy for SQLAlchemy reasons.  We currently use the "cascading delete" feature in SQLAlchemy... however, if we load one "application" that has the video media type enabled, then that imports and sees the {{{VideoData}}} table.  If we create another mediagoblin app instance without the video media type enabled, sqlalchemy will try to delete related entries during a cascading delete from the videodata table but won't be able to and will thus throw an exception.
    44
    55There's one of two solutions to this: