diff --git a/moto/dynamodb2/responses.py b/moto/dynamodb2/responses.py index acc9dfb5e..d41e4b366 100644 --- a/moto/dynamodb2/responses.py +++ b/moto/dynamodb2/responses.py @@ -148,10 +148,13 @@ class DynamoHandler(BaseResponse): res = re.search('\"\"', json.dumps(item)) if res: er = 'com.amazonaws.dynamodb.v20111205#ValidationException' - return 400, {'server': 'amazon.com'}, dynamo_json_dump( - {'__type': er, - 'message': ('One or more parameter values were invalid: ' - 'An AttributeValue may not contain an empty string')}) + return (400, + {'server': 'amazon.com'}, + dynamo_json_dump({'__type': er, + 'message': ('One or more parameter values were ' + 'invalid:An AttributeValue may not ' + 'contain an empty string')} + )) overwrite = 'Expected' not in self.body if not overwrite: