Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99e73be

Browse files
author
Kotsias, Panagiotis-Christos
committed
Added timestamps in logs
1 parent eccf532 commit 99e73be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_modules.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from unittest import TestCase
21
import json
2+
from datetime import datetime
3+
from unittest import TestCase
34

45
from etherscan.etherscan import Etherscan
56

@@ -32,9 +33,10 @@ def test_methods(self):
3233
# Create log files (will update existing ones)
3334
fname = f"logs/{fun}.json"
3435
log = {
35-
"name": fun,
36+
"method": fun,
3637
"module": v["module"],
3738
"kwargs": v["kwargs"],
39+
"timestamp": datetime.now().strftime("%Y-%m-%d-%H:%M:%S"),
3840
"res": res,
3941
}
4042
dump(log, fname)

0 commit comments

Comments
 (0)