[INTTEST-65] restconf_modules python3 type mismatch Created: 22/Nov/19  Updated: 06/Jan/20  Resolved: 06/Jan/20

Status: Verified
Project: integration-test
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Alexandru Avadanii Assignee: Jamo Luhrsen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

While testing ODL with Functest in OPNFV, we ran into a python3 str vs bytes mismatch in restconf_modules.robot. See downstream Jira ticket [1].

The problem manifests similar to [3] and seems to be caused by [2].

 

============================================================================== Basic & Neutron.Basic.Restconf Modules :: Test suite to verify Restconf is OK. ============================================================================== Get Controller Modules :: Get the restconf modules, check 200 stat... | FAIL | TypeError: a bytes-like object is required, not 'str'

 

Changing resp.content to resp.text fixes the issue; and it should also be backwards compatible with python2.

[1] https://jira.opnfv.org/browse/FUNCTEST-1014

[2] https://git.opendaylight.org/gerrit/gitweb?p=integration/test.git;a=blob;f=csit/suites/integration/basic/restconf_modules.robot#l14

[3] https://github.com/robotframework/robotframework/issues/3254


Generated at Wed Feb 07 20:04:28 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.