Skip to content

Saleor Core: the high performance, composable, headless commerce API.

change ID values in tests after rename of mutations

Maciej Korycinskiabc2c997d45d
diff --git a/tests/api/app/mutations/test_app_drop_failed_installation.py b/tests/api/app/mutations/test_app_drop_failed_installation.py
index 97e91906e3..078d215ee3 100644
--- a/tests/api/app/mutations/test_app_drop_failed_installation.py
+++ b/tests/api/app/mutations/test_app_drop_failed_installation.py
@@ -31,7 +31,7 @@ def test_drop_failed_installation_mutation(
query = DROP_FAILED_INSTALLATION_MUTATION
staff_user.user_permissions.set([permission_manage_apps, permission_manage_orders])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
}
@@ -47,7 +47,7 @@ def test_drop_failed_installation_mutation_by_app(
app_job.status = JobStatus.FAILED
app_job.save()
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
query = DROP_FAILED_INSTALLATION_MUTATION
app_api_client.app.permissions.set(
[permission_manage_apps, permission_manage_orders]
@@ -76,7 +76,7 @@ def test_drop_failed_installation_mutation_out_of_scope_permissions(
staff_user.user_permissions.set([permission_manage_apps])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
}
@@ -94,7 +94,7 @@ def test_drop_failed_installation_mutation_by_app_out_of_scope_permissions(
query = DROP_FAILED_INSTALLATION_MUTATION
app_api_client.app.permissions.set([permission_manage_apps])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
}
@@ -116,7 +116,7 @@ def test_cannot_drop_installation_if_status_is_different_than_failed(
query = DROP_FAILED_INSTALLATION_MUTATION
staff_user.user_permissions.set([permission_manage_apps, permission_manage_orders])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
}
diff --git a/tests/api/app/mutations/test_app_retry_install.py b/tests/api/app/mutations/test_app_retry_install.py
index 3a6fa07a9b..111cd7948a 100644
--- a/tests/api/app/mutations/test_app_retry_install.py
+++ b/tests/api/app/mutations/test_app_retry_install.py
@@ -44,13 +44,14 @@ def test_retry_install_app_mutation(
)
query = RETRY_INSTALL_APP_MUTATION
staff_user.user_permissions.set([permission_manage_apps, permission_manage_orders])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
"activate_after_installation": True,
}
response = staff_api_client.post_graphql(query, variables=variables,)
content = get_graphql_content(response)
+ print(content)
app_job = AppJob.objects.get()
app_job_data = content["data"]["appRetryInstall"]["appJob"]
assert int(app_job_data["id"]) == app_job.id
@@ -72,7 +73,7 @@ def test_retry_install_app_mutation_by_app(
monkeypatch.setattr(
"saleor.graphql.app.mutations.install_app_task.delay", mocked_task
)
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
query = RETRY_INSTALL_APP_MUTATION
app_api_client.app.permissions.set(
[permission_manage_apps, permission_manage_orders]
@@ -106,7 +107,7 @@ def test_retry_install_app_mutation_missing_required_permissions(
staff_user.user_permissions.set([permission_manage_apps])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
}
@@ -130,7 +131,7 @@ def test_retry_install_app_mutation_by_app_missing_required_permissions(
app_job.save()
query = RETRY_INSTALL_APP_MUTATION
app_api_client.app.permissions.set([permission_manage_apps])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
}
@@ -164,7 +165,7 @@ def test_cannot_retry_installation_if_status_is_different_than_failed(
)
query = RETRY_INSTALL_APP_MUTATION
staff_user.user_permissions.set([permission_manage_apps, permission_manage_orders])
- id = graphene.Node.to_global_id("OngoingAppInstallation", app_job.id)
+ id = graphene.Node.to_global_id("AppOngoingInstallation", app_job.id)
variables = {
"id": id,
"activate_after_installation": True,