'Converts JSON test results into unittest.TestResults.
precondition: test should have attribute \'result\' which
is a unittest.TestResult (for that test).'

def convert(self, json_results, test):

    results_dict = json.loads(json_results)
    failures = results_dict['testResults']['failures']
    passes = results_dict['testResults']['passes']
    self.add_json_failures_to_results(failures, test)
    self.add_json_successes_to_results(passes, test)
