• Stefy Lanza (nextime / spora )'s avatar
    Fix studio and market-reference route tests for current implementation · 01a2551d
    Stefy Lanza (nextime / spora ) authored
    These tests lagged behind two refactors:
    
    - build_studio_catalog is now an async coroutine. Update the studio tests to
      await it: direct-call tests wrap it in asyncio.run(), and the HTTP tests'
      monkeypatched stubs are now async (the route handler awaits the result, so a
      sync stub returning a dict raised "object dict can't be used in 'await'
      expression").
    - The providers page bootstraps provider data from a dedicated JSON <script>
      element (providers_bootstrap_json, escaped by the route's _json_parse_bootstrap
      helper) parsed via JSON.parse, instead of an inline `let providersData = {...}`
      literal. Update the admin bootstrap test to feed providers_bootstrap_json and
      assert on the <script id="providers-bootstrap"> element (escaping + double
      JSON decode) and the JSON.parse usage.
    - Add the missing record_dashboard_event method to MarketReferenceImportDbStub,
      which the market import route now calls.
    
    tests/routes now passes 86/86 (was 18 failing).
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    01a2551d
Name
Last commit
Last update
..
auth Loading commit data...
payments Loading commit data...
providers Loading commit data...
routes Loading commit data...
test_analytics_savings.py Loading commit data...
test_coderai_broker.py Loading commit data...
test_dashboard_event_filters.py Loading commit data...
test_dashboard_proxy_events.py Loading commit data...
test_database_user_market_filters.py Loading commit data...
test_feature_resolution.py Loading commit data...
test_geolocation.py Loading commit data...
test_license_headers.py Loading commit data...
test_runpod_provider.py Loading commit data...
test_studio.py Loading commit data...
test_studio_sidebar_and_coderai_catalog.py Loading commit data...