Тёмный

Testing a Django Model | Django Project | djblogger | 17 

Very Academy
Подписаться 65 тыс.
Просмотров 12 тыс.
50% 1

In this tutorial, we introduce how to to test a Django model.
Udemy Course Link:
www.udemy.com/course/django-p...
RU-vid Ed Course Link:
• Django Project: djblogger
Developing applications can be a fun and effective way of learning a language and framework. In this course we build a blog application Introducing you to Python Django Framework, Django Templating, the Bootstrap framework, HTMX, CSS, and HTML. In addition, this course introduces testing aspects of a Django project.
This course is primarily designed for anyone looking for a journey learning the Django Framework or developing web applications with Python. This course is a great starting point or a good first step after first learning about any of the technologies that this course features.

Опубликовано:

 

22 дек 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@Brocollipy
@Brocollipy Год назад
Great summary as ever. Funny I've just been reviewing your tests series as a refresher before doing a bunch of testing.
@owusudavid7840
@owusudavid7840 Год назад
A subscriber from Ghana Love your videos ❤
@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?
@vishalmehta7753
@vishalmehta7753 Год назад
Hello sir, I watch your tutorials it's very knowledgeable can you please make one deep video on the serializer.
@CharlesBLim
@CharlesBLim Год назад
Testing can this so long and complicated huh, lol. But thank you for explaining it properly.
@TanveerAhmad-xe9qk
@TanveerAhmad-xe9qk Год назад
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 Год назад
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 Год назад
@@veryacademy Thanks
@imran-potter
@imran-potter Год назад
What's the difference between Your actual udemy course and RU-vid edition?
@veryacademy
@veryacademy Год назад
No difference yet, expect you have access to the source and future course updates.
@colosus2811
@colosus2811 Год назад
Hello, going to create a dockerfile for this project?
@veryacademy
@veryacademy Год назад
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 6 месяцев назад
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 6 месяцев назад
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.
@felix30ua
@felix30ua Год назад
hi! good content! why don't you do the same with django's built-in test framework - unit test?)
@veryacademy
@veryacademy Год назад
I prefer using Pytest, simple as that. As with everything, there are adv and disadvantages between the different testing frameworks.
@uktamjonkomilov2046
@uktamjonkomilov2046 Год назад
1-like
Далее
How to Git Commit | Django Project | djblogger | 18
3:14
This or That 🛍️
00:52
Просмотров 4,2 млн
Каха бизнес-класс
00:48
Просмотров 1,3 млн
How to use Action Decorators in Django RestFrameWork
11:08
How I'd Learn Web Development (If I Could Start Over)
6:55
Django Multiple Database Setup Ex1
32:51
Просмотров 36 тыс.
This or That 🛍️
00:52
Просмотров 4,2 млн