1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
gh-webhook-actor/tests/__init__.py

20 lines
463 B
Python
Raw Normal View History

2018-10-26 09:16:14 +01:00
from unittest import TestCase
from app.server import app
import uuid
class BaseTestCase(TestCase):
def setUp(self):
super().setUp()
self.app = app.test_client()
def send_webhook(self, event_type, data={}):
return self.app.post(
"/postreceive",
json=data,
headers={
"X-GitHub-Event": event_type,
"X-GitHub-Delivery": str(uuid.uuid4()),
},
)