Projet

Général

Profil

0001-python3-explicit-file-opening-mode-32448.patch

Paul Marillonnet, 18 avril 2019 14:32

Télécharger (1,06 ko)

Voir les différences:

Subject: [PATCH] python3: explicit file opening mode (#32448)

 tests/test_idp_oidc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/test_idp_oidc.py
294 294
    assert response.json['ou'] == simple_user.ou.name
295 295
    assert response.json['roles'][0] == 'Whatever'
296 296
    assert response.json.get('cityscape_image') is None
297
    simple_user.attributes.cityscape_image = File(open('tests/200x200.jpg'))
297
    simple_user.attributes.cityscape_image = File(open('tests/200x200.jpg', 'rb'))
298 298
    response = app.get(user_info_url, headers=bearer_authentication_headers(access_token))
299 299
    assert response.json['cityscape_image'].startswith('http://testserver/media/profile-image/')
300 300

  
301
-