From 1b4832a7039d111f20de5c429e1a75300b527ccc Mon Sep 17 00:00:00 2001 From: rht Date: Sun, 1 Aug 2021 10:12:50 -0400 Subject: [PATCH] slack_import: Remove obsolete SlackImportAttachment placeholder. This was introduced in f4ad464d82dd30fcbf4bf08a9f16bd74986301fd, and incompletely removed in e037c2f93e649c28a71c02559b5ae7a3333f42a8; here we finish removing it. --- zerver/data_import/slack.py | 2 -- zerver/tests/test_slack_importer.py | 1 - 2 files changed, 3 deletions(-) diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py index f73c533e25..c8efcb1ff9 100755 --- a/zerver/data_import/slack.py +++ b/zerver/data_import/slack.py @@ -1094,8 +1094,6 @@ def get_attachment_path_and_content(fileinfo: ZerverFieldsT, realm_id: int) -> T s3_path = "/".join( [ str(realm_id), - "SlackImportAttachment", # This is a special placeholder which should be kept - # in sync with 'exports.py' function 'import_message_data' format(random.randint(0, 255), "x"), secrets.token_urlsafe(18), sanitize_name(fileinfo["name"]), diff --git a/zerver/tests/test_slack_importer.py b/zerver/tests/test_slack_importer.py index bce668aee8..48cdf849d1 100644 --- a/zerver/tests/test_slack_importer.py +++ b/zerver/tests/test_slack_importer.py @@ -1137,7 +1137,6 @@ class SlackImporter(ZulipTestCase): self.assertEqual(len(uploads_list), 1) image_path = zerver_attachment[0]["path_id"] - self.assertIn("/SlackImportAttachment/", image_path) expected_content = f"[Apple](/user_uploads/{image_path})\n[banana](example.com/banana.zip)" self.assertEqual(info["content"], expected_content)