def test_update_user_assignment(self): self.assertEqual(0, Log.objects.count()) user_assignment = SignalUserFactory.create(_signal=self.signal) SignalLogService.log_update_user_assignment(user_assignment) self.assertSignalsNotInLog(self.signals_no_log) self.assertEqual(0, Log.objects.count()) self.assertEqual(0, self.signal.history_log.count()) self.assertEqual(0, user_assignment.history_log.count())
def update_user_assignment_handler(sender, signal_obj, user_assignment, *args, **kwargs): """ Create a log rule """ SignalLogService.log_update_user_assignment(user_assignment)