Skip to content

Commit 978962b

Browse files
surajitsurajit
authored andcommitted
update test for dynamo db
1 parent 46e1ff4 commit 978962b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

aws/services/dynamo_db/logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ async def create_log(data):
2525
"request_ip": data["request_ip"],
2626
"message": json.dumps(data["message"]),
2727
}
28-
return table.put_item(trans)
28+
return table.put_item(Item=trans)
2929
except botocore.exceptions.ClientError as e:
3030
raise BotoClientException(e)

logger/log.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ async def wrapper(*args, **kwargs):
5959
request_ip=client,
6060
message=message
6161
)
62-
res = await create_log(data)
63-
print('res',res)
62+
await create_log(data)
6463
except Exception as exc:
6564
logger.exception(f"Exception occurred {exc}")
6665
pass

tests/integrations/test_dynamo_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class MockDynamoDbTable:
9-
def put_item(self, item):
9+
def put_item(self, **kwargs):
1010
response = read_json("dynamo_db_response.json")
1111
return response
1212

0 commit comments

Comments
 (0)