コード例 #1
0
ファイル: test_models.py プロジェクト: TroJan/fjord
    def test_match_product(self):
        # Test match all products
        tr = TriggerRuleFactory()

        assert tr.match_product('') is True
        assert tr.match_product('sprocket') is True

        # Test match specific product
        prod = ProductFactory()
        tr = TriggerRuleFactory()
        tr.products.add(prod)

        assert tr.match_product('') is False
        assert tr.match_product('sprocket') is False
        assert tr.match_product(prod.db_name) is True