7 class WebsocketTest(unittest.TestCase):
9 run_test_server.run(websockets=True)
11 def on_event(self, ev):
13 self.assertEqual(200, ev['status'])
16 self.assertEqual(self.h[u'uuid'], ev[u'object_uuid'])
24 run_test_server.authorize_with("admin")
25 api = arvados.api('v1', cache=False)
26 arvados.events.subscribe(api, [['object_uuid', 'is_a', 'arvados#human']], lambda ev: self.on_event(ev))
28 self.h = api.humans().create(body={}).execute()
32 run_test_server.stop()