slack importer: Include only slack's purpose field in description.

This commit is contained in:
Rhea Parekh 2018-03-14 00:43:40 +05:30 committed by Tim Abbott
parent 8a4f307c43
commit 90a3ffc5c0
2 changed files with 2 additions and 4 deletions

View File

@ -328,8 +328,7 @@ def channels_to_zerver_stream(slack_data_dir: str, realm_id: int, added_users: A
# map Slack's topic and purpose content into Zulip's stream description.
# WARN This mapping is lossy since the topic.creator, topic.last_set,
# purpose.creator, purpose.last_set fields are not preserved.
description = "topic: {}\npurpose: {}".format(channel["topic"]["value"],
channel["purpose"]["value"])
description = channel["purpose"]["value"]
stream_id = stream_id_list[stream_id_count]
recipient_id = recipient_id_list[recipient_id_count]

View File

@ -312,8 +312,7 @@ class SlackImporter(ZulipTestCase):
# stream mapping
self.assertEqual(zerver_stream[0]['name'], channel_data[0]['name'])
self.assertEqual(zerver_stream[0]['deactivated'], channel_data[0]['is_archived'])
self.assertEqual(zerver_stream[0]['description'],
"topic: {}\npurpose: {}".format('random', 'no purpose'))
self.assertEqual(zerver_stream[0]['description'], 'no purpose')
self.assertEqual(zerver_stream[0]['invite_only'], False)
self.assertEqual(zerver_stream[0]['realm'], realm_id)
self.assertEqual(zerver_stream[2]['id'],