mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-25 00:34:21 +03:00
Added test_ugettext_lazy test. Refs #87.
This commit is contained in:
parent
c995ab397c
commit
ed8b296e75
|
@ -1,8 +1,8 @@
|
||||||
"""Tests for the resource module"""
|
"""Tests for the resource module"""
|
||||||
from django.test import TestCase
|
|
||||||
from djangorestframework.serializer import Serializer
|
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.test import TestCase
|
||||||
|
from django.utils.translation import ugettext_lazy
|
||||||
|
from djangorestframework.serializer import Serializer
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import decimal
|
import decimal
|
||||||
|
@ -44,6 +44,9 @@ class TestObjectToData(TestCase):
|
||||||
self.assertEquals(self.serialize({'keys': 'foo'}), {'keys': u'foo'})
|
self.assertEquals(self.serialize({'keys': 'foo'}), {'keys': u'foo'})
|
||||||
self.assertEquals(self.serialize({'values': 'foo'}), {'values': u'foo'})
|
self.assertEquals(self.serialize({'values': 'foo'}), {'values': u'foo'})
|
||||||
|
|
||||||
|
def test_ugettext_lazy(self):
|
||||||
|
self.assertEquals(self.serialize(ugettext_lazy('foobar')), u'foobar')
|
||||||
|
|
||||||
|
|
||||||
class TestFieldNesting(TestCase):
|
class TestFieldNesting(TestCase):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user