コード例 #1
0
def check_empty_include_rules(request):
    obj = Obj()
    obj.info.unstable = True
    obj.info.priority = 2
    obj.tags = {'chrome'}

    selector = Selector()        
    selector.validate(obj)
コード例 #2
0
def check_third_include_match(request):
    obj = Obj()
    obj.info.unstable = True
    obj.info.priority = 2
    obj.tags = {'chrome'}

    selector = Selector()    
    selector.include("not unstable")
    selector.include("priority is 3")
    selector.include("with tag chrome")
    
    selector.validate(obj)
コード例 #3
0
def check_no_include_match(request):
    obj = Obj()
    obj.info.unstable = True
    obj.info.priority = 2
    obj.tags = {'chrome'}

    selector = Selector()    
    selector.include("not unstable")
    selector.include("priority is 3")
    selector.include("with tag firefox")
    
    try:
        selector.validate(obj)
    except NoInclusionRuleMet as e:
        pass
    else:
        raise AssertionError()
コード例 #4
0
def check_third_exclude_match(request):
    obj = Obj()
    obj.info.unstable = True
    obj.info.priority = 2
    obj.tags = {'chrome'}

    selector = Selector()    
    selector.exclude("not unstable")
    selector.exclude("priority is 3")
    selector.exclude("with tag chrome")
    
    try:
        selector.validate(obj)
    except ExclusionRuleMet as e:
        assert e.rule.rule_str == "with tag chrome"
    else:
        raise AssertionError()
コード例 #5
0
def check_empty_exclude_rules(request):
    obj = Obj()

    selector = Selector()        
    selector.validate(obj)