def dummy_users_data(users_table): user = { "username": { "S": "*****@*****.**" }, "aws:rep:deleting": { "BOOL": False }, "aws:rep:updateregion": { "S": "us-west-2" }, "last_udpated": { "N": "1547848006" }, "requests": { "L": [{ "S": "abc-def-ghi" }] }, } from consoleme.lib.dynamo import BaseDynamoHandler users_table.put_item( TableName="consoleme_users_global", Item=BaseDynamoHandler()._data_to_dynamo_replace(user), ) yield users_table
def dummy_requests_data(requests_table): user = { "request_id": { "S": "abc-def-ghi" }, "aws:rep:deleting": { "BOOL": False }, "aws:rep:updateregion": { "S": "us-west-2" }, "aws:rep:updatetime": { "N": "1547848006" }, "group": { "S": "test_group" }, "justification": { "S": "some reason" }, "last_updated": { "N": "1245678901" }, "request_time": { "N": "1234567890" }, "status": { "S": "pending" }, "updated_by": { "S": "*****@*****.**" }, "username": { "S": "*****@*****.**" }, "reviewer_commnets": { "S": "All the access!" }, } from consoleme.lib.dynamo import BaseDynamoHandler requests_table.put_item( TableName="consoleme_requests_global", Item=BaseDynamoHandler()._data_to_dynamo_replace(user), ) yield requests_table