Projet

Général

Profil

0005-misc-fix-singleton-comparison-pylint-error-56982.patch

Valentin Deniaud, 21 septembre 2021 17:09

Télécharger (1,73 ko)

Voir les différences:

Subject: [PATCH 05/59] misc: fix singleton-comparison pylint error (#56982)

 tests/test_attribute_kinds.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/test_attribute_kinds.py
552 552
    form.set('last_name', 'Doe')
553 553
    form.set('cityscape_image-clear', True)
554 554
    response = form.submit()
555
    assert john().attributes.cityscape_image == None
555
    assert john().attributes.cityscape_image is None
556 556

  
557 557
    # verify API serves None for empty profile images
558 558
    app.authorization = ('Basic', (admin.username, admin.username))
......
576 576

  
577 577
    # clear image via API, by putting empty JSON
578 578
    response = app.put_json('/api/users/%s/' % john().uuid, params={'cityscape_image': ''})
579
    assert john().attributes.cityscape_image == None
579
    assert john().attributes.cityscape_image is None
580 580

  
581 581
    # put back first image via API, by putting base64 encoded JSON
582 582
    with open('tests/200x200.jpg', 'rb') as f:
......
611 611

  
612 612
    # clear image via API, not using JSON
613 613
    response = app.put('/api/users/%s/' % john().uuid, params={'cityscape_image': ''})
614
    assert john().attributes.cityscape_image == None
614
    assert john().attributes.cityscape_image is None
615 615

  
616 616
    # put back first image via API, not using JSON
617 617
    response = app.put(
618
-