          self.assertEquals(serializer.is_valid(), False)
          self.assertEquals(serializer.errors, {'info': [u'Ensure this value has at most 12 characters (it has 13).']})
  
  
  class ModelValidationTests(TestCase):
      def test_validate_unique(self):
          """
          Just check if serializers.ModelSerializer handles unique checks via .full_clean()
          """
          serializer = AlbumsSerializer(data={'title': 'a'})
 
</s> remove from rest_framework.tests.models import (Album, ActionItem, Anchor, BasicModel,
 </s> add from rest_framework.tests.models import (HasPositiveIntegerAsChoice, Album, ActionItem, Anchor, BasicModel,
class PositiveIntegerAsChoiceTests(TestCase):
    def test_positive_integer_in_json_is_correctly_parsed(self):
        data = {'some_integer':1}
        serializer = PositiveIntegerAsChoiceSerializer(data=data)
        self.assertEquals(serializer.is_valid(), True)

          self.assertEquals(serializer.is_valid(), False)
          self.assertEquals(serializer.errors, {'info': [u'Ensure this value has at most 12 characters (it has 13).']})
  
  
class PositiveIntegerAsChoiceTests(TestCase):
    def test_positive_integer_in_json_is_correctly_parsed(self):
        data = {'some_integer':1}
        serializer = PositiveIntegerAsChoiceSerializer(data=data)
        self.assertEquals(serializer.is_valid(), True)

  class ModelValidationTests(TestCase):
      def test_validate_unique(self):
          """
          Just check if serializers.ModelSerializer handles unique checks via .full_clean()
          """
          serializer = AlbumsSerializer(data={'title': 'a'})
keep keep keep add keep keep keep keep keep keep
 Added test for "positive_integer in choices tuple does not get parsed if not string".

Signed-off-by: Joel Marcotte <skaner@gmail.com> 
rest_framework/tests/serializer.py