'validate sale records attribute values with the response object'

def validate_sale_records_response(self, res, course_registration_code, invoice, used_codes, invoice_item):

    self.assertEqual(res['total_amount'], invoice.total_amount)
    self.assertEqual(res['recipient_email'], invoice.recipient_email)
    self.assertEqual(res['recipient_name'], invoice.recipient_name)
    self.assertEqual(res['company_name'], invoice.company_name)
    self.assertEqual(res['company_contact_name'], invoice.company_contact_name)
    self.assertEqual(res['company_contact_email'], invoice.company_contact_email)
    self.assertEqual(res['internal_reference'], invoice.internal_reference)
    self.assertEqual(res['customer_reference_number'], invoice.customer_reference_number)
    self.assertEqual(res['invoice_number'], invoice.id)
    self.assertEqual(res['created_by'], course_registration_code.created_by.username)
    self.assertEqual(res['course_id'], invoice_item.course_id.to_deprecated_string())
    self.assertEqual(res['total_used_codes'], used_codes)
    self.assertEqual(res['total_codes'], 5)
