예제 #1
0
class IntegerFieldTestCase(TestCase):
    def setUp(self):
        super(IntegerFieldTestCase, self).setUp()
        self.field = IntegerField('name')

    def test_from_cdms_value(self):
        self.assertEqual(
            self.field.from_cdms_value(10),
            10
        )

    def test_from_cdms_value_None(self):
        self.assertEqual(
            self.field.from_cdms_value(None),
            None
        )

    def test_to_cdms_value(self):
        self.assertEqual(
            self.field.to_cdms_value(10),
            10
        )

    def test_to_cdms_value_None(self):
        self.assertEqual(
            self.field.to_cdms_value(None),
            None
        )
예제 #2
0
 def setUp(self):
     super(IntegerFieldTestCase, self).setUp()
     self.field = IntegerField('name')