django-rest-framework/tests/test_serializer_empty.py
2014-09-09 17:46:28 +01:00

16 lines
481 B
Python

# from django.test import TestCase
# from rest_framework import serializers
# class EmptySerializerTestCase(TestCase):
# def test_empty_serializer(self):
# class FooBarSerializer(serializers.Serializer):
# foo = serializers.IntegerField()
# bar = serializers.MethodField()
# def get_bar(self, obj):
# return 'bar'
# serializer = FooBarSerializer()
# self.assertEquals(serializer.data, {'foo': 0})