示例#1
0
def test__add_result__junit_provider_zero_test_result__provider_has_data():
    report_writer_man = ReportWriterManager(ReportWriters.JUNIT)
    test_results = TestResults()
    report_writer_man.add_result('notepad', test_results)

    report_man = report_writer_man._providers[ReportWritersTypes.JUNIT]
    assert report_man.has_data()
示例#2
0
def test__add_result__tags_provider_one_test_result__provider_has_data():
    report_writer_man = ReportWriterManager(ReportWriters.TAGS)
    test_results = TestResults()
    test_results.append(TestResult("mycase", True, 10, ['hello']))
    report_writer_man.add_result('notepad', test_results)

    report_man = report_writer_man._providers[ReportWritersTypes.TAGS]
    assert report_man.has_data()
示例#3
0
def test__add_result__junit_provider_one_test_result__provider_has_data():
    report_writer_man = ReportWriterManager(ReportWriters.JUNIT)
    test_results = TestResults()
    test_results.append(TestResult("mycase", True, 10, []))
    report_writer_man.add_result('notepad', test_results)

    report_man = report_writer_man._providers[ReportWritersTypes.JUNIT]
    assert isinstance(report_man, JunitXMLReportWriter)
    assert report_man.has_data()
示例#4
0
def test__write__two_providers__returns_two_names():
    report_writer_man = ReportWriterManager(ReportWriters.TAGS +
                                            ReportWriters.JUNIT)
    test_results = TestResults()
    test_results.append(TestResult("mycase", True, 10, ['hello']))
    report_writer_man.add_result('notepad', test_results)

    results = report_writer_man.providers_names()

    assert len(results) == 2