pedroeagle/Trabalho-Individual-2020-2

View on GitHub
api/task/tests.py

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
from django.test import TestCase
from task.models import Task


class TestModels(TestCase):
    def test_task_creation(self):
        task_title = "Task title"
        task_description = "Task description"
        task = Task.objects.create(
            title=task_title,
            description=task_description)
        self.assertEqual(task.title, task_title)
        self.assertEqual(task.description, task_description)