mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-09 17:39:31 +00:00
fix job tests
This commit is contained in:
parent
4b9c8efc4b
commit
1cb35ac48a
|
@ -51,7 +51,7 @@ mutation removeJob($sshInput: SshMutationInput!) {
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def test_graphql_remove_job_unauthorized(client, some_users, mock_subprocess_popen, mock_jobs):
|
def test_graphql_remove_job_unauthorized(client, mock_subprocess_popen, mock_jobs):
|
||||||
response = client.post(
|
response = client.post(
|
||||||
"/graphql",
|
"/graphql",
|
||||||
json={
|
json={
|
||||||
|
@ -68,7 +68,7 @@ def test_graphql_remove_job_unauthorized(client, some_users, mock_subprocess_pop
|
||||||
assert response.json().get("data") is None
|
assert response.json().get("data") is None
|
||||||
|
|
||||||
|
|
||||||
def test_graphql_remove_job(authorized_client, some_users, mock_subprocess_popen, mock_jobs):
|
def test_graphql_remove_job(authorized_client, mock_subprocess_popen, mock_jobs):
|
||||||
response = authorized_client.post(
|
response = authorized_client.post(
|
||||||
"/graphql",
|
"/graphql",
|
||||||
json={
|
json={
|
||||||
|
@ -85,7 +85,7 @@ def test_graphql_remove_job(authorized_client, some_users, mock_subprocess_popen
|
||||||
assert response.json()["data"]["removeJob"]["message"] is not None
|
assert response.json()["data"]["removeJob"]["message"] is not None
|
||||||
assert response.json()["data"]["removeJob"]["success"] is True
|
assert response.json()["data"]["removeJob"]["success"] is True
|
||||||
|
|
||||||
def test_graphql_remove_job_not_found(authorized_client, some_users, mock_subprocess_popen, mock_jobs_return_false):
|
def test_graphql_remove_job_not_found(authorized_client, mock_subprocess_popen, mock_jobs_return_false):
|
||||||
response = authorized_client.post(
|
response = authorized_client.post(
|
||||||
"/graphql",
|
"/graphql",
|
||||||
json={
|
json={
|
||||||
|
|
Loading…
Reference in a new issue