зеркало из https://github.com/mozilla/treeherder.git
Bug 1226565 - Test that update-parse-status 404s for a non-existent id
We're about to change the implementation of update_parse_status; this test will ensure trying to update the status for a non-existent job_log_url record will still result in a 404 response.
This commit is contained in:
Родитель
cd79f9a96a
Коммит
d90775a227
|
@ -0,0 +1,15 @@
|
|||
import pytest
|
||||
from webtest.app import AppError
|
||||
|
||||
from treeherder.client import TreeherderClient
|
||||
|
||||
|
||||
def test_update_parse_status_nonexistent_id(test_project, mock_post_json):
|
||||
"""
|
||||
Attempting to update the parse status for a non-existent log should return a 404.
|
||||
"""
|
||||
client = TreeherderClient(protocol='http', host='localhost')
|
||||
non_existent_id = 9999999
|
||||
with pytest.raises(AppError) as e:
|
||||
client.update_parse_status(test_project, non_existent_id, 'parsed')
|
||||
assert "404 NOT FOUND" in str(e.value)
|
Загрузка…
Ссылка в новой задаче