2 # Copyright (c) 2017 The Bitcoin Core developers
3 # Distributed under the MIT software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 """Test the RPC call related to the uptime command.
7 Test corresponds to code in rpc/server.cpp.
12 from test_framework
.test_framework
import BitcoinTestFramework
15 class UptimeTest(BitcoinTestFramework
):
20 self
.setup_clean_chain
= True
25 def _test_uptime(self
):
27 self
.nodes
[0].setmocktime(int(time
.time() + wait_time
))
28 assert(self
.nodes
[0].uptime() >= wait_time
)
31 if __name__
== '__main__':