c91b7e24ff
subunit2json module was implemented based on subunit2html module, which cause several issues(see attached bugs for more details). The main approach of new parser: it designed to be used from Python code, not as live-filter for a stream. Since such parser can be used not only for verification, the implementation is moved to common dir. Also, this patch: - removes fake log, which was left from xml parser; - removes all db calls(except list call) from cli.verify module. Closes-Bug: #1456810 Closes-Bug: #1471400 Change-Id: Ifcfce827a0df1e75f58e198ee899d4bb85ca9376
40 lines
1.5 KiB
Python
40 lines
1.5 KiB
Python
# Copyright 2014: Mirantis Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
|
|
def get_fake_test_case():
|
|
return {
|
|
"total": {
|
|
"failures": 1,
|
|
"tests": 2,
|
|
"expected_failures": 0,
|
|
"time": 1.412},
|
|
"test_cases": {
|
|
"fake.failed.TestCase.with_StringException[gate,negative]": {
|
|
"name":
|
|
"fake.failed.TestCase.with_StringException[gate,negative]",
|
|
"traceback": ("_StringException: Empty attachments:\nOops..."
|
|
"There was supposed to be fake traceback, but it"
|
|
" is not.\n"),
|
|
"time": 0.706,
|
|
"status": "fail"},
|
|
"fake.successful.TestCase.fake_test[gate,negative]": {
|
|
"name": "fake.successful.TestCase.fake_test[gate,negative]",
|
|
"time": 0.706,
|
|
"status": "success"
|
|
}
|
|
}
|
|
}
|