Commit eef15c2d authored by Laros's avatar Laros
Browse files

Assume title is required.

parent f7e68e96
......@@ -117,9 +117,7 @@ def completed(output_handle, server_name, client_id, ssl_check):
def _minimal_metadata(title):
if title:
return {'title': title, 'files': []}
return {'files': []}
return {'title': title, 'files': []}
def _make_metadata(log_handle, file_handles, title):
......@@ -174,9 +172,9 @@ def transfer(log_handle, file_handles, server_name, user_id, title, ssl_check):
transfer_client = TransferClient(server_name, ssl_check)
# Sanity check before we do anything.
test_metadata = _minimal_metadata(None)
test_metadata = _minimal_metadata('title')
test_metadata['files'].append(
{'filename': 'a', 'md5': '00000000000000000000000000000000'})
{'filename': 'file', 'md5': '00000000000000000000000000000000'})
jsonschema.validate(test_metadata, transfer_client.schema(user_id))
# Make the metadata and transfer the files.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment