mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
34 lines
670 B
Python
34 lines
670 B
Python
import base64
|
|
import pytest
|
|
|
|
from flask import url_for
|
|
|
|
from data import model
|
|
from endpoints.test.shared import conduct_call
|
|
from test.fixtures import *
|
|
|
|
|
|
def test_start_build_disabled_trigger(app, client):
|
|
trigger = model.build.list_build_triggers("devtable", "building")[0]
|
|
trigger.enabled = False
|
|
trigger.save()
|
|
|
|
params = {
|
|
"trigger_uuid": trigger.uuid,
|
|
}
|
|
|
|
headers = {
|
|
"Authorization": "Basic " + base64.b64encode("devtable:password"),
|
|
}
|
|
|
|
conduct_call(
|
|
client,
|
|
"webhooks.build_trigger_webhook",
|
|
url_for,
|
|
"POST",
|
|
params,
|
|
None,
|
|
400,
|
|
headers=headers,
|
|
)
|