forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Adjust to new changes in populate_db.
- Loading branch information
1 parent
9b2b24c
commit d3d62f9
Showing
36 changed files
with
79 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -336,8 +336,8 @@ def test_export_files_from_local(self) -> None: | |
self.assertEqual('1.png', os.listdir(fn)[0]) | ||
records = full_data['emoji_dir_records'] | ||
self.assertEqual(records[0]['file_name'], '1.png') | ||
self.assertEqual(records[0]['path'], '1/emoji/images/1.png') | ||
self.assertEqual(records[0]['s3_path'], '1/emoji/images/1.png') | ||
self.assertEqual(records[0]['path'], '2/emoji/images/1.png') | ||
self.assertEqual(records[0]['s3_path'], '2/emoji/images/1.png') | ||
|
||
# Test avatars | ||
fn = os.path.join(full_data['avatar_dir'], original_avatar_path_id) | ||
|
@@ -386,8 +386,8 @@ def check_variable_type(user_profile_id: int, realm_id: int) -> None: | |
records = full_data['emoji_dir_records'] | ||
self.assertEqual(records[0]['file_name'], '1.png') | ||
self.assertTrue('last_modified' in records[0]) | ||
self.assertEqual(records[0]['path'], '1/emoji/images/1.png') | ||
self.assertEqual(records[0]['s3_path'], '1/emoji/images/1.png') | ||
self.assertEqual(records[0]['path'], '2/emoji/images/1.png') | ||
self.assertEqual(records[0]['s3_path'], '2/emoji/images/1.png') | ||
check_variable_type(records[0]['user_profile_id'], records[0]['realm_id']) | ||
|
||
# Test avatars | ||
|
@@ -415,13 +415,12 @@ def test_zulip_realm(self) -> None: | |
realm_emoji.save() | ||
|
||
data = full_data['realm'] | ||
self.assertEqual(len(data['zerver_userprofile_crossrealm']), 0) | ||
self.assertEqual(len(data['zerver_userprofile_crossrealm']), 3) | ||
self.assertEqual(len(data['zerver_userprofile_mirrordummy']), 0) | ||
|
||
exported_user_emails = self.get_set(data['zerver_userprofile'], 'email') | ||
self.assertIn(self.example_email('cordelia'), exported_user_emails) | ||
self.assertIn('[email protected]', exported_user_emails) | ||
self.assertIn('[email protected]', exported_user_emails) | ||
|
||
exported_streams = self.get_set(data['zerver_stream'], 'name') | ||
self.assertEqual( | ||
|
@@ -472,7 +471,6 @@ def test_export_realm_with_exportable_user_ids(self) -> None: | |
self.assertIn(self.example_email('cordelia'), dummy_user_emails) | ||
self.assertIn(self.example_email('othello'), dummy_user_emails) | ||
self.assertIn('[email protected]', dummy_user_emails) | ||
self.assertIn('[email protected]', dummy_user_emails) | ||
self.assertNotIn(self.example_email('iago'), dummy_user_emails) | ||
self.assertNotIn(self.example_email('hamlet'), dummy_user_emails) | ||
|
||
|
@@ -541,7 +539,7 @@ def test_export_realm_with_member_consent(self) -> None: | |
|
||
data = full_data['realm'] | ||
|
||
self.assertEqual(len(data['zerver_userprofile_crossrealm']), 0) | ||
self.assertEqual(len(data['zerver_userprofile_crossrealm']), 3) | ||
self.assertEqual(len(data['zerver_userprofile_mirrordummy']), 0) | ||
|
||
exported_user_emails = self.get_set(data['zerver_userprofile'], 'email') | ||
|
@@ -550,7 +548,6 @@ def test_export_realm_with_member_consent(self) -> None: | |
self.assertIn(self.example_email('iago'), exported_user_emails) | ||
self.assertIn(self.example_email('othello'), exported_user_emails) | ||
self.assertIn('[email protected]', exported_user_emails) | ||
self.assertIn('[email protected]', exported_user_emails) | ||
|
||
exported_streams = self.get_set(data['zerver_stream'], 'name') | ||
self.assertEqual( | ||
|
Oops, something went wrong.