(self)
| 922 | assert excinfo.value.code == 0 |
| 923 | |
| 924 | def test_panel_reply(self): |
| 925 | |
| 926 | replies = [] |
| 927 | |
| 928 | class _Node(pidbox.Node): |
| 929 | |
| 930 | def reply(self, data, exchange, routing_key, **kwargs): |
| 931 | replies.append(data) |
| 932 | |
| 933 | panel = _Node( |
| 934 | hostname=hostname, |
| 935 | state=self.create_state(consumer=Consumer(self.app)), |
| 936 | handlers=control.Panel.data, |
| 937 | mailbox=self.app.control.mailbox, |
| 938 | ) |
| 939 | r = panel.dispatch('ping', reply_to={ |
| 940 | 'exchange': 'x', |
| 941 | 'routing_key': 'x', |
| 942 | }) |
| 943 | assert r == {'ok': 'pong'} |
| 944 | assert replies[0] == {panel.hostname: {'ok': 'pong'}} |
| 945 | |
| 946 | def test_pool_restart(self): |
| 947 | consumer = Consumer(self.app) |
nothing calls this directly
no test coverage detected