1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Files
quay/endpoints/test/test_webhooks.py
Kenny Lee Sin Cheong 5f63b3a7bb chore: drop deprecated tables and remove unused code (PROJQUAY-522) (#2089)
* chore: drop deprecated tables and remove unused code

* isort imports

* migration: check for table existence before drop
2023-08-25 12:17:24 -04:00

34 lines
676 B
Python

import base64
from test.fixtures import *
import pytest
from flask import url_for
from data import model
from endpoints.test.shared import conduct_call, gen_basic_auth
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": gen_basic_auth("devtable", "password"),
}
conduct_call(
client,
"webhooks.build_trigger_webhook",
url_for,
"POST",
params,
None,
400,
headers=headers,
)