コード例 #1
0
ファイル: tests.py プロジェクト: FZambia/fly
    def test_check_match(self):
        p = ObjectPipe()

        section = {
            "hostname": {
                "conditions": [("exact", "mail.ru"), ]
            }
        }
        res = p.check_match(copy(self.obj), section)
        self.assertEqual(res, True)

        section = {
            "hostname": {
                "conditions": [("exact", "bail.ru"), ]
            }
        }
        res = p.check_match(copy(self.obj), section)
        self.assertEqual(res, False)