aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/httpbasics.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2015-12-02 18:12:23 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-01-13 20:31:03 +0100
commit7777994846cdb9b9cf69e391a33eeed30393bbcf (patch)
tree371953417d82780ca58a8cd7c8fe96e4c71fa216 /qa/rpc-tests/httpbasics.py
parent17ef279304a94ec01a8525189b80c163d931b1cf (diff)
downloadbitcoin-7777994846cdb9b9cf69e391a33eeed30393bbcf.tar.xz
[qa] Fix pyton syntax in rpc tests
Diffstat (limited to 'qa/rpc-tests/httpbasics.py')
-rwxr-xr-xqa/rpc-tests/httpbasics.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py
index 5b9fa00976..eb548aee9d 100755
--- a/qa/rpc-tests/httpbasics.py
+++ b/qa/rpc-tests/httpbasics.py
@@ -36,13 +36,13 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn = httplib.HTTPConnection(url.hostname, url.port)
conn.connect()
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
- out1 = conn.getresponse().read();
+ out1 = conn.getresponse().read()
assert_equal('"error":null' in out1, True)
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
#send 2nd request without closing connection
conn.request('POST', '/', '{"method": "getchaintips"}', headers)
- out2 = conn.getresponse().read();
+ out2 = conn.getresponse().read()
assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
conn.close()
@@ -53,13 +53,13 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn = httplib.HTTPConnection(url.hostname, url.port)
conn.connect()
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
- out1 = conn.getresponse().read();
+ out1 = conn.getresponse().read()
assert_equal('"error":null' in out1, True)
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
#send 2nd request without closing connection
conn.request('POST', '/', '{"method": "getchaintips"}', headers)
- out2 = conn.getresponse().read();
+ out2 = conn.getresponse().read()
assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
conn.close()
@@ -70,7 +70,7 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn = httplib.HTTPConnection(url.hostname, url.port)
conn.connect()
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
- out1 = conn.getresponse().read();
+ out1 = conn.getresponse().read()
assert_equal('"error":null' in out1, True)
assert_equal(conn.sock!=None, False) #now the connection must be closed after the response
@@ -82,7 +82,7 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn = httplib.HTTPConnection(urlNode1.hostname, urlNode1.port)
conn.connect()
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
- out1 = conn.getresponse().read();
+ out1 = conn.getresponse().read()
assert_equal('"error":null' in out1, True)
#node2 (third node) is running with standard keep-alive parameters which means keep-alive is on
@@ -93,7 +93,7 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn = httplib.HTTPConnection(urlNode2.hostname, urlNode2.port)
conn.connect()
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
- out1 = conn.getresponse().read();
+ out1 = conn.getresponse().read()
assert_equal('"error":null' in out1, True)
assert_equal(conn.sock!=None, True) #connection must be closed because bitcoind should use keep-alive by default