def test_company_name_change_callback(self):
     signals.company_name_change_callback(
         sender=self, request=self.request, user=self.user_3, company=self.company_2, old_name='Old Name', new_name='New Name')
     audit_log_event = UnitTestAuditLogEvent.objects.get()
     self.assertEqual(audit_log_event.user_id, 3)
     self.assertEqual(audit_log_event.user_email, '*****@*****.**')
     self.assertEqual(audit_log_event.company_id, 1)
     self.assertEqual(audit_log_event.masquerading_user_id, None)
     self.assertEqual(audit_log_event.masquerading_user_email, '')
     self.assertEqual(audit_log_event.message, 'Company id: 2 name change from: Old Name to: New Name')
 def test_company_name_change_callback_masquerade_no_audit_log(self):
     signals.company_name_change_callback(
         sender=self, request=self.request_masquerade, user=self.user_3, company=self.company_2, old_name='Old Name',
         new_name='New Name')
     self.assertEqual(0, UnitTestAuditLogEvent.objects.count())