Review the attached json file and write a query using python code to generate a report (output file) of average salary for each jobTitleName categorised by region. Example: In 'CA' region the average salary of a 'Developer' is '25,000' In 'CA' region the average salary of a 'Product Owner' is '2,000' In 'YA' region the average salary of a 'Developer' is '20,000'
Write test cases to test the query code and the report file using the pytest library. Kindly, be elaborative of your test cases and state the assumptions made clearly and there is no limit on the number of testcases. You can either use Python Spark or Python Pandas to complete this assessment, once done please upload it to your github and make it public and provide us the link via email.