mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
16 lines
491 B
Python
16 lines
491 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.SerializerMethodField()
|
|
|
|
# def get_bar(self, obj):
|
|
# return 'bar'
|
|
|
|
# serializer = FooBarSerializer()
|
|
# self.assertEquals(serializer.data, {'foo': 0})
|