'description': None, 'author': 1, 'url': None, } author = models.Author.objects.create( name="hodor", email="
[email protected]", ) course_material = models.CourseMaterial.objects.create( title="Hodoooor", author=author, ) url = reverse('teaching:coursematerial-list') response = self.client.post(url, data, format='json') self.assertEqual( response.status_code, status.HTTP_201_CREATED, response.content) self.assertEqual(response.data, data)