Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
makseq committed Apr 25, 2024
1 parent eb0efad commit e532c95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions label_studio/tests/webhooks/test_webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def project_webhook(configured_project):
url=uri,
)


@pytest.fixture
def ml_start_training_webhook(configured_project):
organization = configured_project.organization
Expand All @@ -41,6 +42,7 @@ def ml_start_training_webhook(configured_project):
url=uri,
)


@pytest.mark.django_db
def test_run_webhook(setup_project_dialog, organization_webhook):
webhook = organization_webhook
Expand Down Expand Up @@ -436,7 +438,5 @@ def test_start_training_webhook(setup_project_dialog, ml_start_training_webhook,
assert len(request_history) == 1
assert request_history[0].method == 'POST'
assert request_history[0].url == webhook.url
assert request_history[0].json() == {
'action': 'START_TRAINING',
'project': {'id': project.id, 'title': project.title, 'description': project.description},
}
assert 'project' in request_history[0].json()
assert request_history[0].json()['action'] == 'START_TRAINING'

0 comments on commit e532c95

Please sign in to comment.