tcms.signals module

Defines custom signals sent throught out Kiwi TCMS. You can connect your own handlers if you’d like to augment some of the default behavior!

If you simply want to connect a signal handler add the following code to your local_settings.py:

from tcms.signals import *

USER_REGISTERED_SIGNAL.connect(notify_admins)

In case you want to perform more complex signal handling we advise you to create a new Django app and connect your handler function(s) to the desired signals inside the AppConfig.ready method. When you are done connect your Django app to the rest of Kiwi TCMS by altering the following setting:

INSTALLED_APPS += ['my_custom_app']
tcms.signals.POST_UPDATE_SIGNAL = <django.dispatch.dispatcher.Signal object>

Sent by tcms.core.ajax.update() internally. Do not override!

tcms.signals.USER_REGISTERED_SIGNAL = <django.dispatch.dispatcher.Signal object>

Sent when a new user is registered into Kiwi TCMS through any of the backends which support user registration. The signal receives three keyword parameters: request, user and backend respectively!

tcms.signals.notify_admins(sender, **kwargs)[source]

Very simple signal handler which sends emails to site admins when a new user has been registered!

Warning

This handler isn’t connected to the USER_REGISTERED_SIGNAL by default!

tcms.signals.pre_save_clean(sender, **kwargs)[source]
tcms.signals.handle_emails_post_case_save(sender, instance, created=False, **_kwargs)[source]

Send email updates after a TestCase has been updated!

tcms.signals.handle_emails_pre_case_delete(sender, instance, **_kwags)[source]

Send email updates before a TestCase will be deleted!

tcms.signals.handle_emails_post_plan_save(sender, instance, created=False, **_kwargs)[source]

Send email updates after a TestPlan has been updated!

tcms.signals.handle_emails_post_run_save(sender, *_args, **kwargs)[source]

Send email updates after a TestRus has been created or updated!

tcms.signals.handle_post_case_run_save(sender, *_args, **kwargs)[source]

Auto-update TestRun status after TestCaseRun is created!

tcms.signals.handle_post_case_run_delete(sender, **kwargs)[source]

Auto-update TestRun status after TestCaseRun is deleted!

tcms.signals.handle_post_update_from_ajax(sender, **kwargs)[source]

Auto-update TestRun status after TestCaseRun is deleted!