forked from petertodd/python-bitcoinlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_rpc.py
More file actions
36 lines (31 loc) · 1.31 KB
/
Copy pathtest_rpc.py
File metadata and controls
36 lines (31 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Copyright (C) 2013-2014 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or distributed except according to the terms contained in the
# LICENSE file.
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from bitcoin.rpc import Proxy
class Test_RPC(unittest.TestCase):
# Tests disabled, see discussion below.
# "Looks like your unit tests won't work if Bitcoin Core isn't running;
# maybe they in turn need to check that and disable the test if core isn't available?"
# https://github.com/petertodd/python-bitcoinlib/pull/10
pass
# def test_can_validate(self):
# working_address = '1CB2fxLGAZEzgaY4pjr4ndeDWJiz3D3AT7'
# p = Proxy()
# r = p.validateAddress(working_address)
# self.assertEqual(r['address'], working_address)
# self.assertEqual(r['isvalid'], True)
#
# def test_cannot_validate(self):
# non_working_address = 'LTatMHrYyHcxhxrY27AqFN53bT4TauR86h'
# p = Proxy()
# r = p.validateAddress(non_working_address)
# self.assertEqual(r['isvalid'], False)