fix error in ws_connect
This commit is contained in:
parent
51fd5a58d7
commit
117952a1d7
2 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,7 @@ def liveblog_connect(message, apphook, lang, post):
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
Group(post.liveblog_group).add(message.reply_channel)
|
Group(post.liveblog_group).add(message.reply_channel)
|
||||||
|
message.reply_channel.send({"accept": True})
|
||||||
|
|
||||||
|
|
||||||
def liveblog_disconnect(message, apphook, lang, post):
|
def liveblog_disconnect(message, apphook, lang, post):
|
||||||
|
|
|
@ -38,6 +38,8 @@ try:
|
||||||
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
|
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
|
||||||
message = self.get_next_message('setup', require=True)
|
message = self.get_next_message('setup', require=True)
|
||||||
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
|
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
|
||||||
|
result = self.get_next_message(message.reply_channel.name, require=True)
|
||||||
|
self.assertTrue(result['accept'])
|
||||||
|
|
||||||
plugin = add_plugin(
|
plugin = add_plugin(
|
||||||
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True
|
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True
|
||||||
|
@ -80,6 +82,8 @@ try:
|
||||||
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
|
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
|
||||||
message = self.get_next_message('setup', require=True)
|
message = self.get_next_message('setup', require=True)
|
||||||
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
|
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
|
||||||
|
result = self.get_next_message(message.reply_channel.name, require=True)
|
||||||
|
self.assertTrue(result['accept'])
|
||||||
|
|
||||||
plugin = add_plugin(
|
plugin = add_plugin(
|
||||||
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=False
|
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=False
|
||||||
|
@ -114,6 +118,8 @@ try:
|
||||||
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
|
Channel('setup').send({'connect': 1, 'reply_channel': 'reply'})
|
||||||
message = self.get_next_message('setup', require=True)
|
message = self.get_next_message('setup', require=True)
|
||||||
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
|
liveblog_connect(message, self.app_config_1.namespace, 'en', post.slug)
|
||||||
|
result = self.get_next_message(message.reply_channel.name, require=True)
|
||||||
|
self.assertTrue(result['accept'])
|
||||||
|
|
||||||
plugin = add_plugin(
|
plugin = add_plugin(
|
||||||
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True
|
post.liveblog, 'LiveblogPlugin', language='en', body='live text', publish=True
|
||||||
|
|
Loading…
Reference in a new issue