def test_write_to_json(): """Tests the write_to_json function of the DataWriter, which should be able to take in an dictionary and output file path, and write that dictionary to the specified output file. Returns ------- None """ dr = DataReader("test_data1.csv") hrm = HRM_Processor(dr) dw = DataWriter(hrm) metrics = {"test": 5, "another word": 18.5} output_file = "test.json" dw.write_to_json(metrics, output_file) with open(output_file) as infile: written_data = json.load(infile) assert written_data == metrics