Skip to content

Instantly share code, notes, and snippets.

@mathewmoon
Created July 29, 2019 16:29
Show Gist options
  • Save mathewmoon/ab9b18c011d44731280c36368d77829c to your computer and use it in GitHub Desktop.
Save mathewmoon/ab9b18c011d44731280c36368d77829c to your computer and use it in GitHub Desktop.
class attribute_type(TestUnit):
def __init__(self):
print(" \033[01;37;40m \n Starting test for " + inspect.stack()[1][4][0].split('.')[0].split('=')[-1])
self.parser._expression_attribute_names = {"#path": "body"}
self.parser._expression_attribute_values = {
':string1': {
'S': "a"
},
':string2': {
'S': "b"
},
':string3': {
'S': "c"
},
':number1': {
'N': 1
},
':number2': {
'N': 2
},
':number3': {
'N': 3
},
':stringType': {
'S': 'S'
},
':numberType': {
'S': 'N'
},
':mapType': {
'S': 'M'
},
":listType": {
'S': 'L'
},
"map": {
"M": {
"mapkey": "mapval"
}
}
}
self.message = {
"body": {
"number1": 1,
"number2": 2,
"number3": 3,
"string1": "a",
"string2": "b",
"string3": "c",
"numberList": [1, 2, 3],
"map": {
"mapkey": "mapvalue"
}
}
}
self.expressions = [
"attribute_type( #path.string1, :stringType )",
"attribute_type( #path.number1, :numberType )",
"attribute_type( #path.map, :mapType )",
"attribute_type( #path.numberList, :listType )",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment