def handle_action_start(data): action_name = data['action_name'] if action_name not in hello_world_channel_names: hello_world_channel_names[action_name] = \ create_interface_channel_name('HelloWorld', 'action_{}'.format(action_name)) blueprint.cache.incr(hello_world_channel_names[action_name])
def test_init(self): stream = FilteredInterfaceSseStream('HelloWorld3', 'random_filtered') self.assertEqual(stream.interface, 'HelloWorld3') self.assertEqual( stream.channel, create_interface_channel_name('HelloWorld3', 'random_filtered'))
def test_init(self): stream = InterfaceSseStream('HelloWorld2', 'random') self.assertEqual(stream.interface, 'HelloWorld2') self.assertEqual(stream.channel, create_interface_channel_name('HelloWorld2', 'random'))
def test_create_interface_channel_name(self): self.assertEqual(create_interface_channel_name('HelloWorld', 'count'), 'HelloWorld::count')
def test_init(self): stream = InterfaceSseStream('HelloWorld2', 'random') self.assertEqual(stream.interface, 'HelloWorld2') self.assertEqual( stream.channel, create_interface_channel_name('HelloWorld2', 'random'))
def test_init(self): stream = FilteredInterfaceSseStream('HelloWorld3', 'random_filtered') self.assertEqual(stream.interface, 'HelloWorld3') self.assertEqual(stream.channel, create_interface_channel_name('HelloWorld3', 'random_filtered'))