コード例 #1
0
ファイル: test_datatypes.py プロジェクト: Schevo/kiwi
    def testGetConverters(self):
        converters = converter.get_converters((Decimal,))
        # Curreny is a subclass of Decimal, so it should be in converters
        conv = converter.get_converter(currency)
        self.assertTrue(conv in converters)

        converters = converter.get_converters((object,))
        # Object is treated specially. Make sure its in the list
        conv = converter.get_converter(object)
        self.assertTrue(conv in converters)
コード例 #2
0
    def testGetConverters(self):
        converters = converter.get_converters((decimal.Decimal, ))
        # Curreny is a subclass of Decimal, so it should be in converters
        conv = converter.get_converter(currency)
        self.assertTrue(conv in converters)

        converters = converter.get_converters((object, ))
        # Object is treated specially. Make sure its in the list
        conv = converter.get_converter(object)
        self.assertTrue(conv in converters)
コード例 #3
0
    def _get_converters(self):
        if not self.widget_type:
            AssertionError("%r should define a widget_type" % self)

        allowed = self.widget_type.allowed_data_types
        return converter.get_converters(allowed)
コード例 #4
0
ファイル: gazpacholoader.py プロジェクト: Schevo/kiwi
    def _get_converters(self):
        if not self.widget_type:
            AssertionError("%r should define a widget_type" % self)

        allowed = self.widget_type.allowed_data_types
        return converter.get_converters(allowed)