@@ -15,7 +15,6 @@ class SomeEnum(Enum):
1515
1616class TestEnumField (SimpleTestCase ):
1717 def test_choices (self ):
18-
1918 field = EnumField (choices = SomeEnum )
2019
2120 self .assertDictEqual (field .choices , {"test1" : 1 , "test2" : 2 })
@@ -25,7 +24,6 @@ def test_choices(self):
2524 self .assertDictEqual (field .choices , {"test1" : 1 , "test2" : 2 })
2625
2726 def test_to_internal_value_works (self ):
28-
2927 field = EnumField (choices = SomeEnum )
3028
3129 self .assertEqual (field .to_internal_value (2 ), SomeEnum .test2 )
@@ -37,7 +35,6 @@ def test_to_internal_value_works(self):
3735 self .assertEqual (field .to_internal_value ("test2" ), SomeEnum .test2 )
3836
3937 def test_to_internal_value_validates (self ):
40-
4138 field = EnumField (choices = SomeEnum )
4239
4340 with self .assertRaises (ValidationError ):
@@ -55,13 +52,11 @@ def test_to_internal_value_validates(self):
5552 field .to_internal_value (3 )
5653
5754 def test_to_representation_works (self ):
58-
5955 field = EnumField (choices = SomeEnum )
6056
6157 self .assertEqual (field .to_representation (SomeEnum .test1 ), "test1" )
6258
6359 def test_to_representation_handles_none (self ):
64-
6560 field = EnumField (choices = SomeEnum )
6661
6762 value = field .to_representation (None )
0 commit comments