HomePhabricator

Add user names to json report, corresponding tests

Authored by Fhocutt.

Description

Add user names to json report, corresponding tests

  • Add a method to reports.py to prepend a user's username to the identifying string in the json version of a report so that it's easy to recognize users by glancing through the data (when individual data is requested).
  • Add test_report_result_json and test_report_result_json_no_ind_results to the test suite. test_report_result_json checks the json report for the properly-formatted user data string, and test_report_result_json_no_ind_results checks for the absence of user data strings in the json report when individual results are not present.
  • Fixed incorrect docstrings in reports.py--the user_names dict is keyed by WikiUserKeys, not tuples.
  • Removed trailing whitespace from test_reports.py.
  • Removed conditional for cohort_service from setup_filemanager() in reports.py

Bug: T74747
Change-Id: I5eca5c942e27abfe3b44daf983a11a81f7916782

Details