Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
F483 committed Mar 15, 2016
1 parent c046834 commit f18c1a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_App.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_register_no_payout(self):

# duplicate registration
rv = self.app.get('/api/register/{0}/{1}'.format(nodeid, btc_addr))
self.assertEqual(b"Registration Failed: Address already is registered.",
self.assertEqual(b"Registration Failed: Nodeid already is registered.",
rv.data)
self.assertEqual(rv.status_code, 409)

Expand Down Expand Up @@ -100,7 +100,7 @@ def test_register_w_payout(self):
# duplicate registration
rv = self.app.get('/api/register/{0}/{1}'.format(nodeid,
payout_addr))
self.assertEqual(b"Registration Failed: Address already is registered.",
self.assertEqual(b"Registration Failed: Nodeid already is registered.",
rv.data)
self.assertEqual(rv.status_code, 409)

Expand Down Expand Up @@ -133,15 +133,15 @@ def test_register_invalid_address(self):
nodeid = address2nodeid(btc_addr)
rv = self.app.get('/api/register/{0}/{1}'.format(nodeid,
self.bad_addr))
self.assertEqual(b"Registration Failed: Invalid Bitcoin address.",
self.assertEqual(b"Registration Failed: Invalid nodeid or payout address.",
rv.data)
self.assertEqual(rv.status_code, 400)

# bad nodeid, good address
payout_addr = self.gen_wallet()
rv = self.app.get('/api/register/{0}/{1}'.format(self.bad_addr,
payout_addr))
self.assertEqual(b"Registration Failed: Invalid Bitcoin address.",
self.assertEqual(b"Registration Failed: Invalid nodeid or payout address.",
rv.data)
self.assertEqual(rv.status_code, 400)

Expand Down Expand Up @@ -176,7 +176,7 @@ def test_ping_invalid_address(self):
rv = self.app.get('/api/ping/{0}'.format(self.bad_addr))

# bad ping
self.assertEqual(b"Ping Failed: Invalid Bitcoin address.", rv.data)
self.assertEqual(b"Ping Failed: Invalid nodeid.", rv.data)
self.assertEqual(rv.status_code, 400)


Expand Down

0 comments on commit f18c1a8

Please sign in to comment.