def test_is_valid_subtype_blabla(): validator = ScriptValidator("temp_file", check_git=False) validator.current_script = {"type": "python", "subtype": "blabla"} validator.old_script = {"type": "python", "subtype": "blabla"} assert validator.is_valid_subtype() is False, \ "found valid subtype while it is invalid - blabla"
def test_is_valid_subtype_python2(): validator = ScriptValidator("temp_file", check_git=False) validator.current_script = {"type": "python", "subtype": "python2"} validator.old_script = {"type": "python", "subtype": "python2"} assert validator.is_valid_subtype() is True, \ "found invalid subtype while it is valid - python2"