Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Testing in Django REST Framework

via CodeSignal

Overview

Switch from manual testing with `send_request.py` to automated testing using Django REST Framework's built-in testing capabilities. This course will help you understand the basics of writing tests for your API endpoints, improving reliability, and ensuring your code functions as expected.

Syllabus

  • Unit 1: Introduction to Django Testing
    • Modify Existing Test Case
    • Add a Modulus Test Method
    • Fix List Comparison Assertion
    • Testing for Correct Instances
    • Validate Dictionary Fields with Tests
  • Unit 2: Mocking the Database Using Fixtures in Django
    • Add and Validate a New Item to Fixture
    • Add Default Field Test Case
    • Create a Fixture and Tests
    • Fix the Missing Priority Fields
  • Unit 3: Testing API Endpoints in Django REST Framework
    • Set Up Your First API Test
    • Adding Tests for Creating Todos
    • Test Todo API with POST Requests
    • Update Todo Item Test
    • Extending Update Tests
    • Retrieve Todo Item Details
    • Test Todo Deletion in Django
  • Unit 4: Testing Complex API in Django REST Framework
    • Add Advanced Filtering Test
    • Sorting Todos by Task Field
    • Testing a Non-Existing Page
    • Combining Filters, Sort, and Pagination

Reviews

Start your review of Testing in Django REST Framework

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.