Added test_ugettext_lazy test. Refs #87.

This commit is contained in:
Tom Christie 2012-01-11 16:16:22 +00:00
parent c995ab397c
commit ed8b296e75

View File

@ -1,8 +1,8 @@
"""Tests for the resource module"""
from django.test import TestCase
from djangorestframework.serializer import Serializer
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 decimal
@ -44,6 +44,9 @@ class TestObjectToData(TestCase):
self.assertEquals(self.serialize({'keys': 'foo'}), {'keys': 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):
"""