from django.test import SimpleTestCase
from apps.api.serializers import LineSerializer, PostSerializer


class LineSerializerTest(SimpleTestCase):
    def test_fields(self):
        serializer = LineSerializer()
        self.assertEqual(
            set(serializer.fields.keys()),
            {"id", "text"},
        )

class PostSerializerTest(SimpleTestCase):
    def test_fields(self):
        serializer = PostSerializer()
        self.assertEqual(
            set(serializer.fields.keys()),
            {"id", "name", "url", "lines"},
        )
