зеркало из https://github.com/mozilla/treeherder.git
33 строки
1.0 KiB
Python
33 строки
1.0 KiB
Python
from treeherder.model import search
|
|
|
|
|
|
def test_store_none_subtest(elasticsearch):
|
|
doc = search.TestFailureLine(job_guid="1234",
|
|
test="test",
|
|
subtest=None,
|
|
status="FAIL",
|
|
expected="PASS",
|
|
message="Example")
|
|
doc.save()
|
|
assert doc.subtest is None
|
|
search.refresh_all()
|
|
|
|
docs = search.TestFailureLine.search().execute()
|
|
assert len(docs) == 1
|
|
assert docs[0].subtest is None
|
|
|
|
|
|
def test_store_no_subtest(elasticsearch):
|
|
doc = search.TestFailureLine(job_guid="1234",
|
|
test="test",
|
|
status="FAIL",
|
|
expected="PASS",
|
|
message="Example")
|
|
doc.save()
|
|
assert doc.subtest is None
|
|
search.refresh_all()
|
|
|
|
docs = search.TestFailureLine.search().execute()
|
|
assert len(docs) == 1
|
|
assert docs[0].subtest is None
|