From the course: Building React and Django Apps
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Unit testing caching with Django REST framework
From the course: Building React and Django Apps
Unit testing caching with Django REST framework
- [Instructor] There's some caching being used in the wish list code. Let's write a test to make sure it's working properly. We start by creating a package for testing and we test to make sure the wish list cache starts as empty and we also need to check the API response to ensure that the wish list is empty there as well. Then we're going to add the package to the wish list by posting to the wish list API end point. The cache will be empty at this point and then we're going to retrieve the list and at this point the cache should have the package that we added in it. Now let's run the tests.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Unit testing a component1m 44s
-
(Locked)
Unit testing two React routes and navigation between components2m 15s
-
(Locked)
End2End testing the form submission process1m 30s
-
(Locked)
End2End testing the filtered data table48s
-
(Locked)
Unit testing caching with Django REST framework50s
-
(Locked)
Unit testing sorting and filtering1m 37s
-
(Locked)
Unit testing validation for the REST API59s
-
(Locked)
-