Django Testing Tutorial - Testing Views #3

  Рет қаралды 80,109

The Dumbfounds

The Dumbfounds

Күн бұрын

Пікірлер: 41
@errzrah
@errzrah 4 күн бұрын
I was struggling with testing my django apps but this playlist really helped me out. Thank you!💯
@krichevskoy
@krichevskoy 2 жыл бұрын
very nice QOL changes, me and my group working on our project using this hehe
@sep69
@sep69 Жыл бұрын
Thank you very much for this great video series ! I just started with django tests and this is a great help. Thanks again :)
@SheezZarR
@SheezZarR 5 жыл бұрын
Thanks for the tutorial, It's very helpful for a beginner.
@rahulhindocha
@rahulhindocha 3 жыл бұрын
Hey man...great content. Good explanations given by you. But I had a doubt. You were creating some objects of different models in the tests. Are these objects also created in our database or they are just for testing only?
@ilyasjumadurdyew8074
@ilyasjumadurdyew8074 2 жыл бұрын
When you run tests django creates or re-creates test database wich is set in settings.py, though your real db won't be affected
@BYunus1903
@BYunus1903 Жыл бұрын
@@ilyasjumadurdyew8074 Great answer!
@mkrtichhovhannisyan6244
@mkrtichhovhannisyan6244 3 жыл бұрын
It worked for me perfectly. Thank you.
@basharatmir4025
@basharatmir4025 Жыл бұрын
Thank u so much, helped
@RafaelGuedes84
@RafaelGuedes84 Жыл бұрын
Thanks, man! This was really helpful.
@mohitsharma2376
@mohitsharma2376 4 жыл бұрын
where did that "expenses" come from in "self.assertEquals(self.project1.expenses.first().title, 'expense1')"
@Thedevineforce
@Thedevineforce 3 жыл бұрын
@The Dumbfounds Please link the exact github project path to the code you are using in the tutorial
@Jambajakumba
@Jambajakumba 4 жыл бұрын
Thanks man!!! Keep up the good work
@mrpreseclips7991
@mrpreseclips7991 3 жыл бұрын
Hello i wonder why pycharm throw me “ reverse for ‘list’ not found
@aizhang9919
@aizhang9919 4 жыл бұрын
best tutorial ever!
@N63B44TÜ
@N63B44TÜ 5 жыл бұрын
Thx a lot, great like always!
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
You're welcome!
@TruthSeekerClub
@TruthSeekerClub 2 жыл бұрын
hey man, in post expenses you added the body to client.post(url, {content}) but you have not create an object from it. so how the expense was created? and how it was added to the project! why did it work without creating object and add it to db with relation to project1
@ProSimples
@ProSimples 4 жыл бұрын
I've got this error: postgres' database and will use the first PostgreSQL database instead. warnings.warn( Got an error creating the test database: permission denied to create database I dont know how to fix... :\. Django 3
@sagarpotnis1215
@sagarpotnis1215 2 жыл бұрын
for testing just switch to dbsqlite database and try.. it worked for me
@ProSimples
@ProSimples 2 жыл бұрын
@@sagarpotnis1215 yes we’ve done this approach. Thank you.
@alanwatts8669
@alanwatts8669 4 жыл бұрын
Really nice!
@jg9193
@jg9193 4 жыл бұрын
Tutorials on testing are hard to come by
@MahmoudGamal-xe9rv
@MahmoudGamal-xe9rv 5 жыл бұрын
200 = mean first check at code 200 and if i have article and i want test 1000 . just replace 200 by 1000 ?
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Sorry, could you rephrase the question?
@MahmoudGamal-xe9rv
@MahmoudGamal-xe9rv 5 жыл бұрын
@@thedumbfounds767 I want to make test for users in database and if database can contain more than 10000 user or not ?
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
​@@MahmoudGamal-xe9rv Well, by default, it should be able to contain 10.000 users and many more :)
@MahmoudGamal-xe9rv
@MahmoudGamal-xe9rv 5 жыл бұрын
@@thedumbfounds767 good my question is 200 any relation by default number of users
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
@@MahmoudGamal-xe9rv 200 is the status code of the response. It means that everything was okay.
@vijaysinhparmar
@vijaysinhparmar 4 жыл бұрын
whats your urls file?
@adambabs6582
@adambabs6582 4 жыл бұрын
I am doing it the exact same way and I am getting: AssertionError: 302 != 200
4 жыл бұрын
Try adding the following: def setUp(self): self.client = Client() self.user = User.objects.create_superuser('test_admin', '', 'test_admin') self.client.login(username='test_admin', password='test_admin')
@ankitasoni527
@ankitasoni527 3 жыл бұрын
have you got the solution i am getting the same error
@Yoyo-gf3oi
@Yoyo-gf3oi 5 жыл бұрын
I thought this would come in handy, however you dont really explain what is happening, what each part does etc. This is just a video of someone writing code and narrating what he writes but without any explanation. Its great if the person wants to copy/paste and not understand, but for the long term thinkers, no explanation mean no understanding. Thumbs down
@САМГАДсамгадович
@САМГАДсамгадович 3 жыл бұрын
you should have some background first, i`d advice you to read the official DJ tutorial for begginers, there is testing part and everything is clear for begginers
@shaiksameercse
@shaiksameercse 2 жыл бұрын
It's pretty clear if you have some experience with Django and unit testing. It's not meant for beginners so you can skip this one.
@cooller8888
@cooller8888 Жыл бұрын
dude this extra function is so dull, why just why.... totally ruined the progress for me, why would anybody wanna do such nonsense....
Django Testing Tutorial - Testing Models #4
5:31
The Dumbfounds
Рет қаралды 32 М.
When To Unit, E2E, And Integration Test
14:58
ThePrimeTime
Рет қаралды 100 М.
When u fight over the armrest
00:41
Adam W
Рет қаралды 16 МЛН
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 2,7 МЛН
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 21 МЛН
Django Testing Tutorial - How To Set Up Tests And Testing URLs #2
11:20
Бекенд на Django, Урок 2: Unit Tests
44:15
Senior Pomidor Developer
Рет қаралды 48 М.
DjangoCon 2022 | Quality Assurance in Django - Testing what matters
28:40
DjangoCon Europe
Рет қаралды 2,4 М.
DjangoCon 2022 | factory_boy: testing like a pro
27:09
DjangoCon Europe
Рет қаралды 3,4 М.
Python Django REST API In 30 Minutes - Django Tutorial
30:42
PedroTech
Рет қаралды 30 М.
Stop Writing So Many Tests
10:02
Web Dev Simplified
Рет қаралды 93 М.
Django | Unit Testing with Pytest
20:13
Django road
Рет қаралды 12 М.
Dan Palmer - Scaling Django to 500 apps
29:10
DjangoCon US
Рет қаралды 10 М.
When u fight over the armrest
00:41
Adam W
Рет қаралды 16 МЛН