• 
      

    Fix AccountPage to have default form classes on initial page registration

    Review Request #7103 — Created March 22, 2015 and submitted — Latest diff uploaded

    Information

    Review Board
    master
    4a5e110...

    Reviewers

    When an extension uses AccountPagesHook with a pre-built list of forms (form_classes), the list form_classes is cleared when the extension's AccountPage is unregistered after the extension reloads. This causes the extension's AccountPage(s) to not show up in the account page after.

    This fix keeps track of the initial form_classes defined by the AccountPage with _default_form_classes, such that the original defined list of form_classes will be restored after an extension reload.

    Wrote two unit tests which passed alongside existing tests. Also verified that an extension which uses AccountPagesHook still shows up in account pages after a reload.