tests: Rename 'message.json' to 'messages-000001.json' in export tests.

The export script produces messages in the format 'messages-%06d.json'.
Hence we rename it to 'messages-000001.json'.
This commit is contained in:
Rhea Parekh 2018-06-12 19:01:28 +05:30 committed by Tim Abbott
parent 9d9d59d4b2
commit 0e8f0e2393
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ class ExportTest(ZulipTestCase):
# for certain edge cases. # for certain edge cases.
export_usermessages_batch( export_usermessages_batch(
input_path=os.path.join(output_dir, 'messages-000001.json.partial'), input_path=os.path.join(output_dir, 'messages-000001.json.partial'),
output_path=os.path.join(output_dir, 'message.json') output_path=os.path.join(output_dir, 'messages-000001.json')
) )
def read_file(fn: str) -> Any: def read_file(fn: str) -> Any:
@ -219,7 +219,7 @@ class ExportTest(ZulipTestCase):
result = {} result = {}
result['realm'] = read_file('realm.json') result['realm'] = read_file('realm.json')
result['attachment'] = read_file('attachment.json') result['attachment'] = read_file('attachment.json')
result['message'] = read_file('message.json') result['message'] = read_file('messages-000001.json')
result['uploads_dir'] = os.path.join(output_dir, 'uploads') result['uploads_dir'] = os.path.join(output_dir, 'uploads')
result['emoji_dir'] = os.path.join(output_dir, 'emoji') result['emoji_dir'] = os.path.join(output_dir, 'emoji')
result['avatar_dir'] = os.path.join(output_dir, 'avatars') result['avatar_dir'] = os.path.join(output_dir, 'avatars')