mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-30 06:01:06 -04:00
more tests
This commit is contained in:
@@ -4,6 +4,8 @@ from datetime import datetime, timezone
|
||||
import pytest
|
||||
from flask import url_for
|
||||
from freezegun import freeze_time
|
||||
from hypothesis import HealthCheck, given, settings
|
||||
from hypothesis import strategies as st
|
||||
|
||||
from app.main.views.jobs import get_time_left
|
||||
from tests import job_json, sample_uuid, user_json
|
||||
@@ -381,16 +383,15 @@ def test_should_cancel_job(
|
||||
mock_cancel.assert_called_once_with(SERVICE_ONE_ID, fake_uuid)
|
||||
|
||||
|
||||
@settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
|
||||
@given(fuzzed_uuid=st.uuids())
|
||||
def test_should_not_show_cancelled_job(
|
||||
client_request,
|
||||
active_user_with_permissions,
|
||||
mock_get_cancelled_job,
|
||||
fake_uuid,
|
||||
client_request, active_user_with_permissions, mock_get_cancelled_job, fuzzed_uuid
|
||||
):
|
||||
client_request.get(
|
||||
"main.view_job",
|
||||
service_id=SERVICE_ONE_ID,
|
||||
job_id=fake_uuid,
|
||||
job_id=fuzzed_uuid,
|
||||
_expected_status=404,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user