[Testdriven.io] Test-Driven Development with Django, Django REST Framework, and Docker

[Testdriven.io] Test-Driven Development with Django, Django REST Framework, and Docker

Register & Get access to index
tdd-django-docker.png

In this course, you'll learn how to set up a development environment with Docker in order to build and deploy a microservice powered by Python, Django, and Django REST Framework. You'll also apply the practices of Test-Driven Development with pytest as you develop a RESTful API.

"Code without tests is broken by design." - Jacob Kaplan-Moss

What will you learn?​

Part 1 - Foundation and Concepts
In this first part, you'll learn how to develop a RESTful API with Python, Django, Django REST Framework, and Postgres. You'll containerize Django and Postgres to run inside Docker containers and configure pytest in order to practice Test-Driven Development (TDD).

Learning Objectives​

  1. Develop a RESTful API with Python, Django, and Django REST Framework
  2. Practice Test-Driven Development
  3. Test a Django app with pytest
  4. Containerize Django and Postgres inside a Docker container
  5. Run unit and integration tests with code coverage
  6. Create a custom User model in Django
  7. Implement an API with Django REST Framework Views and Serializers
  8. Check your code for any code quality issues via a linter
Part 2 - Deployment, Testing, and Best Practices
In the second part, you'll start by deploying Django, Gunicorn, and Postgres to Heroku with Docker. You'll then continue to build out the RESTful API as you write unit and integration tests. Finally, we'll look at how to document the API with Swagger.

Learning Objectives​

  1. Configure GitLab CI for continuous integration and deployment
  2. Speed up a Docker-based CI build with Docker Cache
  3. Deploy Django, Gunicorn, and Postgres to Heroku with Docker
  4. Manage static assets with WhiteNoise
  5. Create a production Dockerfile that uses multistage Docker builds
  6. Parameterize test functions and mock functionality in tests with pytest
  7. Run tests in parallel with pytest-xdist

What do you need to know?​

This is not a beginner course. It's designed for the advanced-beginner -- someone with at least six months of web development experience. Before beginning, you should have some familiarity with the following topics. Refer to these resources for more info:

Michael Herman​

Michael is a software engineer and educator who lives and works in the Denver/Boulder area. He is the co-founder/author of Real Python. Besides development, he enjoys building financial models, tech writing, content marketing, and teaching.
Author
etherusb
Downloads
385
Views
2,063
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from etherusb

Latest reviews

testdriven.io course from a real python author ;) even if not the latest version, still rocks!