コード例 #1
0
ファイル: script_test.py プロジェクト: wwylie89/testDemisto
def test_is_changed_subtype_python3():
    validator = ScriptValidator("temp_file", check_git=False)
    validator.current_script = {"type": "python", "subtype": "python3"}
    validator.old_script = {"type": "python", "subtype": "python3"}

    assert validator.is_changed_subtype() is False, \
        "found changed subtype while it was not changed"
コード例 #2
0
ファイル: script_test.py プロジェクト: wwylie89/testDemisto
def test_is_changed_subtype_python2_to_3():
    validator = ScriptValidator("temp_file", check_git=False)
    validator.current_script = {"type": "python", "subtype": "python3"}
    validator.old_script = {"type": "python", "subtype": "python2"}

    assert validator.is_changed_subtype() is True, \
        "Did not find changed subtype while it was changed"
コード例 #3
0
ファイル: script_test.py プロジェクト: wwylie89/testDemisto
def test_updated_docker_image_on_sane_doc_reports_fail_subtype():
    validator = ScriptValidator('Scripts/SaneDocReport/SaneDocReport.yml',
                                check_git=False)
    validator.current_script = {"type": "python", "subtype": "python3"}
    validator.old_script = {"type": "python", "subtype": "python2"}

    assert validator.is_changed_subtype() is True, \
        "Did not find changed subtype while it was changed"
    assert validator.is_backward_compatible(
    ) is False, "The script validator passed sane-doc-reports"