From 578f48c44ec6eda1919055d93a5c3fb41ac21f67 Mon Sep 17 00:00:00 2001 From: Mathieu Cloutier Date: Tue, 8 Oct 2024 22:37:11 -0600 Subject: [PATCH] skip test if in server mode --- tests/test_apigateway/test_apigateway_custom_ids.py | 5 ++++- tests/test_secretsmanager/test_secretsmanager.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_apigateway/test_apigateway_custom_ids.py b/tests/test_apigateway/test_apigateway_custom_ids.py index e864c0781c35..baadb7ec4151 100644 --- a/tests/test_apigateway/test_apigateway_custom_ids.py +++ b/tests/test_apigateway/test_apigateway_custom_ids.py @@ -1,6 +1,7 @@ import boto3 +import pytest -from moto import mock_aws +from moto import mock_aws, settings from moto.apigateway.utils import ( ApigwApiKeyIdentifier, ApigwDeploymentIdentifier, @@ -23,6 +24,7 @@ @mock_aws +@pytest.mark.skipif(not settings.TEST_DECORATOR_MODE, reason="Can't access the id manager in proxy mode") def test_custom_id_rest_api(set_custom_id, account_id): region_name = "us-west-2" rest_api_name = "my-api" @@ -106,6 +108,7 @@ def test_custom_id_rest_api(set_custom_id, account_id): @mock_aws +@pytest.mark.skipif(not settings.TEST_DECORATOR_MODE, reason="Can't access the id manager in proxy mode") def test_custom_id_api_key(account_id, set_custom_id): region_name = "us-west-2" api_key_value = "01234567890123456789" diff --git a/tests/test_secretsmanager/test_secretsmanager.py b/tests/test_secretsmanager/test_secretsmanager.py index b22b192012a2..c432fc773e43 100644 --- a/tests/test_secretsmanager/test_secretsmanager.py +++ b/tests/test_secretsmanager/test_secretsmanager.py @@ -1954,6 +1954,7 @@ def test_update_secret_version_stage_dont_specify_current_stage(secret_arn=None) @mock_aws +@pytest.mark.skipif(not settings.TEST_DECORATOR_MODE, reason="Can't access the id manager in proxy mode") def test_create_secret_custom_id(account_id, set_custom_id): secret_suffix = "randomSuffix" secret_name = "secret-name"