add test
This commit is contained in:
parent
b1ad7b151d
commit
9fbdaf5834
|
@ -2454,6 +2454,7 @@ def test_bug_3831_documents(user3: UserClientFlask):
|
||||||
assert 'Delete Lot' in body
|
assert 'Delete Lot' in body
|
||||||
assert 'Incoming Lot' in body
|
assert 'Incoming Lot' in body
|
||||||
|
|
||||||
|
lot_id = Lot.query.all()[1].id
|
||||||
uri = f'/inventory/lot/{lot_id}/trade-document/add/'
|
uri = f'/inventory/lot/{lot_id}/trade-document/add/'
|
||||||
body, status = user3.get(uri)
|
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/'
|
uri = f'/inventory/lot/{lot_id}/trade-document/add/'
|
||||||
# body, status = user3.post(uri, data=data, content_type="multipart/form-data")
|
body, status = user3.post(uri, data=data, content_type="multipart/form-data")
|
||||||
# assert status == '200 OK'
|
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
|
@pytest.mark.mvp
|
||||||
|
|
Reference in New Issue