Commit bfee6a7d authored by inso's avatar inso

Fix tests

parent dfe7b3f0
......@@ -181,7 +181,7 @@ class Test_BMA_blockchain(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/blockchain/hardship', handler)
_, srv, port, url = await self.create_server('GET', '/blockchain/hardship/8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -221,7 +221,7 @@ class Test_BMA_blockchain(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/blockchain/membership/8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU', handler)
_, srv, port, url = await self.create_server('GET', '/blockchain/memberships/8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -331,7 +331,7 @@ class Test_BMA_blockchain(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '//blockchain/with/leavers', handler)
_, srv, port, url = await self.create_server('GET', '/blockchain/with/leavers', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -454,7 +454,7 @@ class Test_BMA_blockchain(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '//blockchain/with/ud', handler)
_, srv, port, url = await self.create_server('GET', '/blockchain/with/ud', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......
......@@ -30,7 +30,7 @@ class TestBMANetwork(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/blockchain/block/100', handler)
_, srv, port, url = await self.create_server('GET', '/network/peering', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -70,7 +70,7 @@ class TestBMANetwork(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/blockchain/block/100', handler)
_, srv, port, url = await self.create_server('GET', '/network/peering/peers', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......
......@@ -126,7 +126,7 @@ class Test_BMA_TX(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey', handler)
_, srv, port, url = await self.create_server('GET', '/tx/history/pubkey', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -140,7 +140,7 @@ class Test_BMA_TX(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey/0/100', handler)
_, srv, port, url = await self.create_server('GET', '/tx/history/pubkey/blocks/0/100', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -179,7 +179,7 @@ class Test_BMA_TX(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey', handler)
_, srv, port, url = await self.create_server('GET', '/tx/sources/pubkey', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......
......@@ -78,7 +78,7 @@ class Test_BMA_Wot(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey', handler)
_, srv, port, url = await self.create_server('GET', '/wot/lookup/pubkey', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -102,7 +102,7 @@ class Test_BMA_Wot(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/', handler)
_, srv, port, url = await self.create_server('GET', '/wot/members', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -156,7 +156,7 @@ class Test_BMA_Wot(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey', handler)
_, srv, port, url = await self.create_server('GET', '/wot/certifiers-of/pubkey', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -188,7 +188,7 @@ class Test_BMA_Wot(WebFunctionalSetupMixin, unittest.TestCase):
}), "utf-8"), content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey', handler)
_, srv, port, url = await self.create_server('GET', '/wot/certifiers-of/pubkey', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......@@ -202,7 +202,7 @@ class Test_BMA_Wot(WebFunctionalSetupMixin, unittest.TestCase):
return web.Response(body=b'{}', content_type='application/json')
async def go():
_, srv, port, url = await self.create_server('GET', '/pubkey', handler)
_, srv, port, url = await self.create_server('GET', '/wot/certified-by/pubkey', handler)
with self.assertRaises(jsonschema.exceptions.ValidationError):
with aiohttp.ClientSession() as session:
connection = BMAEndpoint("127.0.0.1", None, None, port).conn_handler(session)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment