7 class WebsocketTest(run_test_server.TestCaseWithServers):
8 MAIN_SERVER = {'websockets': True}
10 def on_event(self, ev):
12 self.assertEqual(200, ev['status'])
15 self.assertEqual(self.h[u'uuid'], ev[u'object_uuid'])
23 run_test_server.authorize_with("admin")
24 api = arvados.api('v1', cache=False)
25 arvados.events.subscribe(api, [['object_uuid', 'is_a', 'arvados#human']], lambda ev: self.on_event(ev))
27 self.h = api.humans().create(body={}).execute()