Completed
Push — main ( 65a384...7d4592 )
by Jochen
06:34
created

webhook_settings()   A

Complexity

Conditions 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
nop 0
dl 0
loc 15
rs 9.85
c 0
b 0
f 0
1
"""
2
:Copyright: 2006-2020 Jochen Kupperschmidt
3
:License: Modified BSD, see LICENSE for details.
4
"""
5
6
import pytest
7
8
from byceps.services.webhooks import service as webhook_service
9
10
11
@pytest.fixture(scope='module')
12
def webhook_settings():
13
    scope = 'any'
14
    scope_id = None
15
    format = 'weitersager'
16
    url = 'http://127.0.0.1:12345/'
17
    enabled = True
18
19
    webhook = webhook_service.create_outgoing_webhook(
20
        scope, scope_id, format, url, enabled
21
    )
22
23
    yield
24
25
    webhook_service.delete_outgoing_webhook(webhook.id)
26
27
28
@pytest.fixture(scope='module')
29
def app(admin_app, webhook_settings):
30
    return admin_app
31