                  model = self.SlugFieldModel
  
          serializer = SlugFieldSerializer(data={})
          self.assertEqual(serializer.is_valid(), True)
          self.assertEqual(getattr(serializer.fields['slug_field'], 'max_length'), 20)
  
  
  class URLFieldTests(TestCase):
      """
      Tests for URLField attribute values
 
</s> remove             slug_field = serializers.SlugField(source='slug_field', max_length=20, required=False)
 </s> add             slug_field = serializers.SlugField(source='slug_field',
                                               max_length=20, required=False) </s> remove         self.assertEqual(getattr(serializer.fields['url_field'], 'max_length'), 200)
 </s> add         self.assertEqual(getattr(serializer.fields['url_field'],
                                 'max_length'), 200) </s> remove         self.assertEqual(getattr(serializer.fields['url_field'], 'max_length'), 20)


class HumanizedFieldType(TestCase):
    def test_standard_type_classes(self):
        for field_type_name in forms.fields.__all__:
            field_type = getattr(forms.fields, field_type_name)
            humanized = humanize_field_type(field_type)
            self.assert_valid_name(humanized)

    def test_standard_type_names(self):
        for field_type_name in forms.fields.__all__:
            humanized = humanize_field_type(field_type_name)
            self.assert_valid_name(humanized)

    def test_custom_type_name(self):
        humanized = humanize_field_type('SomeCustomType')
        self.assertEquals(humanized, u'Some custom type')

    def test_custom_type(self):
        custom_type = namedtuple('SomeCustomType', [])
        humanized = humanize_field_type(custom_type)
        self.assertEquals(humanized, u'Some custom type')

    def assert_valid_name(self, humanized):
        """A humanized field name is valid if it's a non-empty
        unicode.

        """
        self.assertIsInstance(humanized, unicode)
        self.assertNotEqual(humanized, '')
 </s> add         self.assertEqual(getattr(serializer.fields['url_field'],
                         'max_length'), 20) </s> remove         self.assertEqual(getattr(serializer.fields['url_field'], 'max_length'), 128)
 </s> add         self.assertEqual(getattr(serializer.fields['url_field'],
                                 'max_length'), 128) </s> remove             url_field = serializers.URLField(source='url_field', max_length=20, required=False)
 </s> add             url_field = serializers.URLField(source='url_field',
                                             max_length=20, required=False)
        self.assertEqual(getattr(serializer.fields['slug_field'],
                                 'max_length'), 20)
                  model = self.SlugFieldModel
  
          serializer = SlugFieldSerializer(data={})
          self.assertEqual(serializer.is_valid(), True)
        self.assertEqual(getattr(serializer.fields['slug_field'],
                                 'max_length'), 20)
  
  
  class URLFieldTests(TestCase):
      """
      Tests for URLField attribute values
keep keep keep keep replace keep keep keep keep keep
 simplified, moved field humanizing to Field. broken tests 
rest_framework/tests/fields.py