0001-tests-correct-a-test-54081.patch
tests/api/test_formdata.py | ||
---|---|---|
507 | 507 |
part = resp.json['evolution'][0]['parts'][0] |
508 | 508 |
assert part['filename'] == 'hello.txt' |
509 | 509 |
assert part['content_type'] == 'text/plain' |
510 | 510 |
assert 'content' in part |
511 | 511 |
assert base64.decodebytes(force_bytes(part['content'])) == b'test' |
512 | 512 | |
513 | 513 |
resp = get_app(pub).get(sign_uri('/api/forms/test/%s/?anonymise' % formdata.id, user=local_user)) |
514 | 514 |
assert len(resp.json['evolution']) == 1 |
515 |
assert 'parts' not in resp.json['evolution'] |
|
515 |
assert 'parts' not in resp.json['evolution'][0]
|
|
516 | 516 | |
517 | 517 |
# check this doesn't get into list of forms API |
518 | 518 |
resp = get_app(pub).get(sign_uri('/api/forms/test/list?full=on', user=local_user)) |
519 | 519 |
assert 'hello.txt' not in resp.text |
520 | 520 | |
521 | 521 | |
522 | 522 |
def test_api_list_formdata(pub, local_user): |
523 | 523 |
pub.role_class.wipe() |
524 |
- |