diff options
| author | Sirushti Murugesan <sirushti.murugesan@hp.com> | 2015-10-12 17:23:06 +0530 |
|---|---|---|
| committer | Sirushti Murugesan <sirushti.murugesan@hp.com> | 2015-10-12 17:23:06 +0530 |
| commit | b12d8502226f56421bbe90747cf1727222c6e6fa (patch) | |
| tree | 0ed236d1f219d56ff0d01502e55b2fe6239cf6c5 /functional/tests | |
| parent | 262af5416b0fad02dee93aed2193cfee761ebd83 (diff) | |
| download | python-openstackclient-b12d8502226f56421bbe90747cf1727222c6e6fa.tar.gz | |
Fix functional tests for Python 3.4
* shlex.split() expects a string. Not bytes.
* decode the bytestring result of subprocess's communicate()
to a string.
Change-Id: I209f67a91dc609b1e30cb9e683d3d6ee63d00069
Diffstat (limited to 'functional/tests')
| -rw-r--r-- | functional/tests/compute/v2/test_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functional/tests/compute/v2/test_server.py b/functional/tests/compute/v2/test_server.py index a6cc98e6..bd1b2a87 100644 --- a/functional/tests/compute/v2/test_server.py +++ b/functional/tests/compute/v2/test_server.py @@ -32,14 +32,14 @@ class ServerTests(test.TestCase): def get_flavor(cls): raw_output = cls.openstack('flavor list -f value -c ID') ray = raw_output.split('\n') - idx = len(ray)/2 + idx = int(len(ray)/2) return ray[idx] @classmethod def get_image(cls): raw_output = cls.openstack('image list -f value -c ID') ray = raw_output.split('\n') - idx = len(ray)/2 + idx = int(len(ray)/2) return ray[idx] @classmethod @@ -49,7 +49,7 @@ class ServerTests(test.TestCase): except exceptions.CommandFailed: return '' ray = raw_output.split('\n') - idx = len(ray)/2 + idx = int(len(ray)/2) return ' --nic net-id=' + ray[idx] @classmethod |
