Updating the list of urls the SSM moto will match to include china

This commit is contained in:
Alan Alexander 2018-12-19 15:02:36 -08:00
parent ed861ecae1
commit 36b0117eec
2 changed files with 13 additions and 0 deletions

View File

@ -3,6 +3,7 @@ from .responses import SimpleSystemManagerResponse
url_bases = [ url_bases = [
"https?://ssm.(.+).amazonaws.com", "https?://ssm.(.+).amazonaws.com",
"https?://ssm.(.+).amazonaws.com.cn",
] ]
url_paths = { url_paths = {

View File

@ -277,6 +277,18 @@ def test_put_parameter():
response['Parameters'][0]['Type'].should.equal('String') response['Parameters'][0]['Type'].should.equal('String')
response['Parameters'][0]['Version'].should.equal(2) response['Parameters'][0]['Version'].should.equal(2)
@mock_ssm
def test_put_parameter_china():
client = boto3.client('ssm', region_name='cn-north-1')
response = client.put_parameter(
Name='test',
Description='A test parameter',
Value='value',
Type='String')
response['Version'].should.equal(1)
@mock_ssm @mock_ssm
def test_get_parameter(): def test_get_parameter():