Lints.
This commit is contained in:
parent
1433f28846
commit
f37bad0e00
260 changed files with 6363 additions and 3766 deletions
|
|
@ -7,7 +7,8 @@ from moto.core.responses import flatten_json_request_body
|
|||
|
||||
|
||||
def test_flatten_json_request_body():
|
||||
spec = AWSServiceSpec('data/emr/2009-03-31/service-2.json').input_spec('RunJobFlow')
|
||||
spec = AWSServiceSpec(
|
||||
'data/emr/2009-03-31/service-2.json').input_spec('RunJobFlow')
|
||||
|
||||
body = {
|
||||
'Name': 'cluster',
|
||||
|
|
@ -42,25 +43,32 @@ def test_flatten_json_request_body():
|
|||
flat['Name'].should.equal(body['Name'])
|
||||
flat['Instances.Ec2KeyName'].should.equal(body['Instances']['Ec2KeyName'])
|
||||
for idx in range(2):
|
||||
flat['Instances.InstanceGroups.member.' + str(idx + 1) + '.InstanceRole'].should.equal(body['Instances']['InstanceGroups'][idx]['InstanceRole'])
|
||||
flat['Instances.InstanceGroups.member.' + str(idx + 1) + '.InstanceType'].should.equal(body['Instances']['InstanceGroups'][idx]['InstanceType'])
|
||||
flat['Instances.Placement.AvailabilityZone'].should.equal(body['Instances']['Placement']['AvailabilityZone'])
|
||||
flat['Instances.InstanceGroups.member.' + str(idx + 1) + '.InstanceRole'].should.equal(
|
||||
body['Instances']['InstanceGroups'][idx]['InstanceRole'])
|
||||
flat['Instances.InstanceGroups.member.' + str(idx + 1) + '.InstanceType'].should.equal(
|
||||
body['Instances']['InstanceGroups'][idx]['InstanceType'])
|
||||
flat['Instances.Placement.AvailabilityZone'].should.equal(
|
||||
body['Instances']['Placement']['AvailabilityZone'])
|
||||
|
||||
for idx in range(1):
|
||||
prefix = 'Steps.member.' + str(idx + 1) + '.HadoopJarStep'
|
||||
step = body['Steps'][idx]['HadoopJarStep']
|
||||
i = 0
|
||||
while prefix + '.Properties.member.' + str(i + 1) + '.Key' in flat:
|
||||
flat[prefix + '.Properties.member.' + str(i + 1) + '.Key'].should.equal(step['Properties'][i]['Key'])
|
||||
flat[prefix + '.Properties.member.' + str(i + 1) + '.Value'].should.equal(step['Properties'][i]['Value'])
|
||||
flat[prefix + '.Properties.member.' +
|
||||
str(i + 1) + '.Key'].should.equal(step['Properties'][i]['Key'])
|
||||
flat[prefix + '.Properties.member.' +
|
||||
str(i + 1) + '.Value'].should.equal(step['Properties'][i]['Value'])
|
||||
i += 1
|
||||
i = 0
|
||||
while prefix + '.Args.member.' + str(i + 1) in flat:
|
||||
flat[prefix + '.Args.member.' + str(i + 1)].should.equal(step['Args'][i])
|
||||
flat[prefix + '.Args.member.' +
|
||||
str(i + 1)].should.equal(step['Args'][i])
|
||||
i += 1
|
||||
|
||||
for idx in range(2):
|
||||
flat['Configurations.member.' + str(idx + 1) + '.Classification'].should.equal(body['Configurations'][idx]['Classification'])
|
||||
flat['Configurations.member.' + str(idx + 1) + '.Classification'].should.equal(
|
||||
body['Configurations'][idx]['Classification'])
|
||||
|
||||
props = {}
|
||||
i = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue