def test_to_internal_value_value(self):
        field = NullableEnumField(period_models.ClotSize)

        result = field.to_internal_value('1')

        self.assertEqual(1, result)
예제 #2
0
    def test_to_internal_value_empty(self):
        field = NullableEnumField(period_models.ClotSize)

        result = field.to_internal_value('')

        self.assertIsNone(result)
    def test_to_internal_value_empty(self):
        field = NullableEnumField(period_models.ClotSize)

        result = field.to_internal_value('')

        self.assertIsNone(result)
예제 #4
0
    def test_to_internal_value_value(self):
        field = NullableEnumField(period_models.ClotSize)

        result = field.to_internal_value('1')

        self.assertEqual(1, result)