diff options
| author | Tom Christie | 2014-12-15 12:18:55 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-15 12:18:55 +0000 | 
| commit | b6ee784240b3c7f6cd62af5b6fe6d1014d7bf6d4 (patch) | |
| tree | e3cdb5a6e210e5ba26d6726cc08a44c8f450776b /tests | |
| parent | 8934e61b67e4aed38b04f2fe18f011ecbf9010cb (diff) | |
| parent | af53e34dd5873f3373e9991c3825e70d92432e14 (diff) | |
| download | django-rest-framework-b6ee784240b3c7f6cd62af5b6fe6d1014d7bf6d4.tar.bz2 | |
Merge master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_fields.py | 4 | ||||
| -rw-r--r-- | tests/test_serializer.py | 6 | 
2 files changed, 6 insertions, 4 deletions
| diff --git a/tests/test_fields.py b/tests/test_fields.py index 3f4e65f2..c20bdd8c 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -62,7 +62,7 @@ class TestEmpty:          """          field = serializers.CharField(allow_blank=True)          output = field.run_validation('') -        assert output is '' +        assert output == ''      def test_default(self):          """ @@ -817,7 +817,7 @@ class TestChoiceField(FieldValues):              ]          )          output = field.run_validation('') -        assert output is '' +        assert output == ''  class TestChoiceFieldWithType(FieldValues): diff --git a/tests/test_serializer.py b/tests/test_serializer.py index 48fcc83b..c17b6d8c 100644 --- a/tests/test_serializer.py +++ b/tests/test_serializer.py @@ -1,6 +1,7 @@  # coding: utf-8  from __future__ import unicode_literals  from rest_framework import serializers +from rest_framework.compat import unicode_repr  import pytest @@ -208,9 +209,10 @@ class TestUnicodeRepr:          class ExampleObject:              def __init__(self):                  self.example = '한국' +              def __repr__(self): -                return self.example.encode('utf8') +                return unicode_repr(self.example)          instance = ExampleObject()          serializer = ExampleSerializer(instance) -        repr(serializer) +        repr(serializer)  # Should not error. | 
