Files
deb-python-pyvmomi/tests
tianhao he 78b955c3b1 Accept both bytes and unicode in xml parser to make it more test friendly.
1. When we read xml in chunk we sometimes join the result with "" which will raise error python3. We also return "" when we reach file end. However, parser.ParseFile() expects bytes and "" is unicode in python3 and this will cause error we see in the log:"TypeError: read() did not return a bytes object (type=str)". Replacing all "" with b"" to make sure we always return bytes to ParseFile method.
2. Replace str with six.binary_type in SoapAdpater to handle byte input for both python 2 and 3. Also add support of unicode input here to make it more test friendly.
3. Remove the existing test_unknown_fault since the test is expecting a wrong message. We should not expect any error here.
2016-04-19 16:16:08 -07:00
..
2014-08-29 17:17:33 -04:00
2015-12-11 10:30:58 -05:00
2015-09-29 17:27:24 -07:00

Testing Guidelines

  • All tests adhere to pep8 standards
  • All tests must be stand-alone and deterministic
  • All tests covering HTTP transactions will have a fixture file
    • fixture file names shall match method names
    • fixtures should be edited to include no more data than necessary
    • fixtures shall not include accessible IP addresses or credentials
  • All changes shall be accompanied by a test
  • All changes shall be associated with an issue number