mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
632 B
19 lines
632 B
# from django.test import TestCase
|
|
#
|
|
# from ..models import SEQUENCE_LABELING, Label
|
|
# from ..serializers import LabelSerializer
|
|
# from .api.utils import prepare_project
|
|
|
|
# class TestLabelSerializer(TestCase):
|
|
#
|
|
# def test_create_label(self):
|
|
# project = prepare_project(SEQUENCE_LABELING)
|
|
# data = {
|
|
# 'text': 'example',
|
|
# 'task_type': 'Span'
|
|
# }
|
|
# serializer = LabelSerializer(data=data)
|
|
# serializer.is_valid()
|
|
# label = serializer.save(project=project.item)
|
|
# created = Label.objects.get(pk=label.id)
|
|
# self.assertEqual(label, created)
|