diff options
| author | Eric Fried <openstack@fried.cc> | 2019-10-29 15:55:11 -0500 |
|---|---|---|
| committer | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-01-12 01:51:11 -0600 |
| commit | 29ec8c8134072b9b3eb6ff89320506bef9ec358a (patch) | |
| tree | 005890f33708da48154ae297170445fbd0db96fe /doc/source/cli/command-objects | |
| parent | 111d6a9b23d8c6b9bcce437039ff49536f0b5dd1 (diff) | |
| download | python-openstackclient-29ec8c8134072b9b3eb6ff89320506bef9ec358a.tar.gz | |
Fix functional tests for py3
Fix various things so the functional tests will work under python3:
- A hashlib.md5() can only be update()d with an encoded string in py3.
- There's no dict.iteritems(), change to dict.items() (which is already
an iterator).
- Open temp files with 'w+' mode rather than the default 'w+b' (as an
alternative to encoding all the write and expected-read payloads as
bytes).
- (This is a weird one) Explicitly raise SkipTest from unittest (rather
than unittest2, which is where cls.skipException landed). Not sure why
this is busted, but this moves the ball.
Conflict/issue with raising SkipTest on this branch.
(cherry picked from commit f1d742f32adeb662a3fdf8fa3ef3bc391e71ed81)
(cherry picked from commit b866202f54afddca66a77cd989b082e193a96956)
Includes squash of:
Before writing object data to stdout, re-open it in binary mode
Otherwise, you can hit TypeErrors on Python3.
Closes-Bug: 1775482
(cherry picked from commit 415b48056d9d021e04ec972029040a89a6b13928)
Change-Id: Ic9b2b47848a600e87a3674289ae7ae8c3e091fee
Diffstat (limited to 'doc/source/cli/command-objects')
0 files changed, 0 insertions, 0 deletions
