def check_cat_sidebar(url, addon):
 cache.clear()
 for type_ in [amo.ADDON_EXTENSION, amo.ADDON_THEME, amo.ADDON_SEARCH]:
  addon.update(type=type_)
  r = Client().get(url)
  assert (pq(r.content)('#side-nav').attr('data-addontype') == str(type_))

def check_cat_sidebar ( url , addon ) : cache . clear ( ) for type_ in [ amo . ADDON_EXTENSION , amo . ADDON_THEME , amo . ADDON_SEARCH ] : addon . update ( type = type_ ) r = Client ( ) . get ( url ) assert ( pq ( r . content ) ( '#side-nav' ) . attr ( 'data-addontype' ) == str ( type_ ) )
ensures that the sidebar shows the categories for the correct type .