Testing a Django Model | Django Project | djblogger | 17

  Рет қаралды 14,058

Very Academy

Very Academy

Күн бұрын

Пікірлер: 17
@owusudavid7840
@owusudavid7840 Жыл бұрын
A subscriber from Ghana Love your videos ❤
@Brocollipy
@Brocollipy 2 жыл бұрын
Great summary as ever. Funny I've just been reviewing your tests series as a refresher before doing a bunch of testing.
@TanveerAhmad-xe9qk
@TanveerAhmad-xe9qk 2 жыл бұрын
Sir can you please make videos on serializer like validate method create method and update or some others validation in serializer we do and nested serializer as well.
@veryacademy
@veryacademy 2 жыл бұрын
These past few days, I have recorded a few of these tutorials for an up-and-coming project. Aiming to release it in about 10-15 days.
@TanveerAhmad-xe9qk
@TanveerAhmad-xe9qk 2 жыл бұрын
@@veryacademy Thanks
@imran-potter
@imran-potter 2 жыл бұрын
What's the difference between Your actual udemy course and KZbin edition?
@veryacademy
@veryacademy Жыл бұрын
No difference yet, expect you have access to the source and future course updates.
@colosus2811
@colosus2811 2 жыл бұрын
Hello, going to create a dockerfile for this project?
@veryacademy
@veryacademy 2 жыл бұрын
Yeah, I’m happy to keep adding to the project. I’m just finishing up the first phase of a larger drf project and need to iterate over the orm course. I will ask the community for suggestions for features at some point.
@ScottKFraley
@ScottKFraley 11 ай бұрын
I'm making this comment at 12:09 into the video, but ummm, I've always been taught that doing unit testing means that you DO NOT talk to anything real, e.g. an actual database. That's more Integration and/or Functional testing.. no? Or is this a "this is how it's done in Python/Django" thing?
@veryacademy
@veryacademy 11 ай бұрын
Your understanding is correct, and there's a distinction between unit testing, integration testing, and functional testing. Unit Testing: In unit testing, the goal is to test a single unit of code in isolation. This means that you mock or fake external dependencies, such as databases, APIs, or external services. The purpose is to ensure that each unit of code functions as expected independently of other components. Integration Testing: Integration testing, on the other hand, focuses on the interactions between different units or components. In this type of testing, you might use real databases, APIs, or other external services to test how different parts of your system work together. Functional Testing: Functional testing goes a step further and tests the entire application's functionality, including user interfaces, databases, and external integrations. It aims to verify that the system behaves according to specifications and requirements. When it comes to Django it is common to perform unit testing using the built-in testing framework, and in these tests, it is typical to use Django's test database facilities to set up a test environment similar to the real one. However, you are correct that the emphasis is still on isolating the specific unit of code being tested. For more comprehensive testing that involves interactions between components, including databases, you would use integration or functional testing, and Django provides tools for those as well. In summary, the distinction between unit, integration, and functional testing is a general software testing principle. While Django's testing framework does allow for some integration testing facilities, it's essential to consider the testing strategy based on the type of testing you are aiming for in a given scenario.
@vishalmehta7753
@vishalmehta7753 2 жыл бұрын
Hello sir, I watch your tutorials it's very knowledgeable can you please make one deep video on the serializer.
@AAABBB34328
@AAABBB34328 Жыл бұрын
Great video! I can now write tests for my model! One question though, my project is set up to use Postgress, but I would like to use sqlite3 only in the case where my tests are run. Do you know how I can do that?
@CharlesBLim
@CharlesBLim Жыл бұрын
Testing can this so long and complicated huh, lol. But thank you for explaining it properly.
@felix30ua
@felix30ua 2 жыл бұрын
hi! good content! why don't you do the same with django's built-in test framework - unit test?)
@veryacademy
@veryacademy 2 жыл бұрын
I prefer using Pytest, simple as that. As with everything, there are adv and disadvantages between the different testing frameworks.
@uktamjonkomilov2046
@uktamjonkomilov2046 2 жыл бұрын
1-like
How to Git Commit | Django Project | djblogger | 18
3:14
Very Academy
Рет қаралды 1,6 М.
Pytest | Django | Introducing Fixtures and Fixture Factory
32:49
Very Academy
Рет қаралды 27 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
How To Write Unit Tests For Existing Python Code // Part 1 of 2
25:07
When To Unit, E2E, And Integration Test
14:58
ThePrimeTime
Рет қаралды 104 М.
Testing JavaScript with Cypress - Full Course
2:39:33
freeCodeCamp.org
Рет қаралды 220 М.
Pytest Tutorial - How to Test Python Code
1:28:39
freeCodeCamp.org
Рет қаралды 226 М.
DjangoCon 2022 | Quality Assurance in Django - Testing what matters
28:40
DjangoCon Europe
Рет қаралды 2,5 М.
Django Interview Questions (Junior Developer)
30:26
Dennis Ivy
Рет қаралды 129 М.
How To Write Unit Tests in Python • Pytest Tutorial
35:34
pixegami
Рет қаралды 152 М.