Track all webhook responses data, and allow using this between alertgroup-related webhooks (e.g. use firing webhook response data when templating the acknowledge webhook request data). NOTE: dropping the table is not backwards compatible but the feature is not enabled (and in any case it would drop log entries only used for status display)
20 lines
425 B
Python
20 lines
425 B
Python
import factory
|
|
|
|
from apps.webhooks.models import Webhook, WebhookResponse
|
|
from common.utils import UniqueFaker
|
|
|
|
|
|
class CustomWebhookFactory(factory.DjangoModelFactory):
|
|
|
|
url = factory.Faker("url")
|
|
name = UniqueFaker("word")
|
|
|
|
class Meta:
|
|
model = Webhook
|
|
|
|
|
|
class WebhookResponseFactory(factory.DjangoModelFactory):
|
|
timestamp = factory.Faker("date_time")
|
|
|
|
class Meta:
|
|
model = WebhookResponse
|