Merge pull request #2000 from AlanAlexander-Janrain/master

Updating the list of urls the SSM moto will match to include china
This commit is contained in:
Steve Pulec 2018-12-28 21:27:45 -05:00 committed by GitHub
commit e8551988d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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():