def form_valid(self, form):
     command_executed.send(self, command=self.command_name, payload=form.cleaned_data)
     return super(OperationView, self).form_valid(form)
 def test_send_command(self):
     command_executed.send(self, command="test", payload={'test': 'value'})
     self.assertTrue(self.commandCalled)