My tests file code:
我的测试文件代码:
from rest_framework import status
from rest_framework.test import APITestCase
class CategoryTests(APITestCase):
def test_create_create(self):
url = '/category/add/'
data = {"name":"Sports","description":"get live updates here"}
response = self.client.post(url, data, format='json')
self.assertEqual(response.data, data)
from rest_fra