Skip to content

Commit

Permalink
Merge pull request hyperledger#1120 from anikitinDSR/public/indy-1934
Browse files Browse the repository at this point in the history
[INDY-1934] change "Update time" field to "Update_time"
  • Loading branch information
ashcherbakov authored Jan 10, 2019
2 parents d80973d + e563276 commit 1450396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion indy_node/server/validator_info_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def info(self):
ts_str = "{}".format(time.strftime(
"%A, %B %{0}d, %Y %{0}I:%M:%S %p %z".format('#' if os.name == 'nt' else '-'),
time.localtime(info["timestamp"])))
info.update({"Update time": ts_str})
info.update({"Update_time": ts_str})
if 'Node_info' in info:
if 'Metrics' in info['Node_info']:
std_ledgers = [POOL_LEDGER_ID, DOMAIN_LEDGER_ID, CONFIG_LEDGER_ID]
Expand Down
4 changes: 2 additions & 2 deletions indy_node/test/validator_info/test_validator_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ def test_validator_info_file_metrics_count_all_ledgers_field_valid(node):


def test_validator_info_update_date_field_valid(info):
assert "Update time" in info
assert "Update_time" in info
import time
import datetime
from_str = time.mktime(datetime.datetime.strptime(info["Update time"],
from_str = time.mktime(datetime.datetime.strptime(info["Update_time"],
"%A, %B %d, %Y %I:%M:%S %p %z").timetuple())
assert int(from_str) == info["timestamp"]

0 comments on commit 1450396

Please sign in to comment.