This commit is contained in:
Cayo Puigdefabregas 2022-11-30 10:59:56 +01:00
parent b1ad7b151d
commit 9fbdaf5834

View file

@ -2454,6 +2454,7 @@ def test_bug_3831_documents(user3: UserClientFlask):
assert 'Delete Lot' in body
assert 'Incoming Lot' in body
lot_id = Lot.query.all()[1].id
uri = f'/inventory/lot/{lot_id}/trade-document/add/'
body, status = user3.get(uri)
@ -2471,8 +2472,16 @@ def test_bug_3831_documents(user3: UserClientFlask):
}
uri = f'/inventory/lot/{lot_id}/trade-document/add/'
# body, status = user3.post(uri, data=data, content_type="multipart/form-data")
# assert status == '200 OK'
body, status = user3.post(uri, data=data, content_type="multipart/form-data")
assert status == '200 OK'
# Second document
uri = f'/inventory/lot/{lot_id}/trade-document/add/'
file_upload = (BytesIO(b_file), file_name)
data['file'] = file_upload
data['csrf_token'] = generate_csrf()
body, status = user3.post(uri, data=data, content_type="multipart/form-data")
assert status == '200 OK'
@pytest.mark.mvp