Projet

Général

Profil

0001-python3-ascii-encode-json-dumps-while-testing-site-i.patch

Paul Marillonnet, 06 mars 2019 22:22

Télécharger (1,31 ko)

Voir les différences:

Subject: [PATCH] python3: ascii-encode json dumps while testing site imports
 (#31185)

 tests/test_manager.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/test_manager.py
637 637
            }]
638 638
    }
639 639
    form['site_json'] = Upload(
640
        'site_export.json', json.dumps(site_export), 'application/octet-stream')
640
        'site_export.json', json.dumps(site_export).encode('ascii'), 'application/octet-stream')
641 641
    res = form.submit()
642 642
    assert res.status_code == 302
643 643
    assert get_role_model().objects.get(slug='basic')
......
662 662
            }]
663 663
    }
664 664
    form['site_json'] = Upload(
665
        'site_export.json', json.dumps(site_export), 'application/octet-stream')
665
        'site_export.json', json.dumps(site_export).encode('ascii'), 'application/octet-stream')
666 666
    res = form.submit()
667 667
    assert res.status_code == 200
668 668
    assert 'missing Organizational Unit' in res.text
669
-