Пример #1
0
    def testCopyValueToString(self):
        """Tests the _CopyValueToString function."""
        filter_object = filters.Filter()

        string = filter_object._CopyValueToString(['1', '2', '3'])
        self.assertEqual(string, '123')

        string = filter_object._CopyValueToString([1, 2, 3])
        self.assertEqual(string, '123')

        string = filter_object._CopyValueToString(123)
        self.assertEqual(string, '123')

        string = filter_object._CopyValueToString(b'123')
        self.assertEqual(string, '123')

        string = filter_object._CopyValueToString('123')
        self.assertEqual(string, '123')
Пример #2
0
 def testInitialize(self):
     """Tests the __init__ function."""
     filter_object = filters.Filter()
     self.assertIsNotNone(filter_object)