diff options
| author | Zuul <zuul@review.openstack.org> | 2017-12-31 13:00:26 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-12-31 13:00:26 +0000 |
| commit | e157365d862877697ab1804445152c2e88f2cb87 (patch) | |
| tree | 5668c46de28655a44e2830b1f1819b19dc945375 /openstackclient/tests | |
| parent | e438c34eaa8335e8727b7dd99a77dc73d37b9d9e (diff) | |
| parent | 0626f95579357918e51d46e4e29720854540bfd9 (diff) | |
| download | python-openstackclient-e157365d862877697ab1804445152c2e88f2cb87.tar.gz | |
Merge "Allow port list to shown undefined attributes"
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/functional/network/v2/test_port.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/network/v2/test_port.py b/openstackclient/tests/functional/network/v2/test_port.py index a7059790..7357c0ed 100644 --- a/openstackclient/tests/functional/network/v2/test_port.py +++ b/openstackclient/tests/functional/network/v2/test_port.py @@ -131,6 +131,16 @@ class PortTests(common.NetworkTagTests): self.assertNotIn(mac1, item_map.values()) self.assertIn(mac2, item_map.values()) + # Test list with unknown fields + json_output = json.loads(self.openstack( + 'port list -f json -c ID -c Name -c device_id' + )) + id_list = [p['ID'] for p in json_output] + self.assertIn(id1, id_list) + self.assertIn(id2, id_list) + # Check an unknown field exists + self.assertIn('device_id', json_output[0]) + def test_port_set(self): """Test create, set, show, delete""" name = uuid.uuid4().hex |
