예제 #1
0
    def test_parse_bool_none(self):
        """
        Xpath will return none if the element is not found.
        :return:
        """
        def bogus():
            return None

        self.assertFalse(parse_bool(bogus)())
예제 #2
0
    def test_parse_bool_true(self):
        def bogus():
            return 'true'

        self.assertTrue(parse_bool(bogus)())
예제 #3
0
    def test_parse_bool_false(self):
        def bogus():
            return 'false'

        self.assertFalse(parse_bool(bogus)())