Store info about files as S3 metadata

Storing things in the session is proving buggy – we still have one user
(that we know about) where the session data isn’t getting written, so
they’re blocked from uploading a file.

Since all the info we’re storing in the session is about the file, it
makes sense to store it with the file.

This commit only does the writing of the metadata, once we’re sure this
is working we can do subsequent work to read it back, and remove
reliance on the session.
This commit is contained in:
Chris Hill-Scott
2018-04-27 16:05:04 +01:00
parent 2ceea61bb1
commit e7e3b95fee
5 changed files with 90 additions and 10 deletions

View File

@@ -2027,6 +2027,11 @@ def mock_s3_download(mocker, content=None):
return mocker.patch('app.main.views.send.s3download', side_effect=_download)
@pytest.fixture(scope='function')
def mock_s3_set_metadata(mocker, content=None):
return mocker.patch('app.main.views.send.set_metadata_on_csv_upload')
@pytest.fixture(scope='function')
def sample_invite(mocker, service_one, status='pending'):
id_ = str(generate_uuid())