Pytest | Django | Introducing Factory Boy and Faker - Fixture Replacement

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 เม.ย. 2021
  • Pytest is a popular python test automation framework. Here we look at replacing Pytest fixtures with Factory Boy in a Python Django project. Factory Boy as a fixtures replacement tool, it aims to replace static, hard to maintain fixtures with easy-to-use factories for complex objects. In this tutorial we intergrade Factory boy into our small app and take a look at some of the more common features.
    Code Repository
    github.com/veryacademy/pytest...
    🐱‍🏍Would you like to SUPPORT US FURTHER so that we can make even more great content - Please consider joining our members community.
    / @veryacademy
    👍SUBSCRIBE to get more free tutorials, courses and code snippets!
    / @veryacademy

ความคิดเห็น • 28

  • @rahulsaha2859
    @rahulsaha2859 3 ปีที่แล้ว +4

    Love your tutorials , keep up the good work sir .
    No one taught me about testing and recently got some interview about testing and here you are , thanks 😊

  • @vasudevareddy6749
    @vasudevareddy6749 3 ปีที่แล้ว +5

    Thank you so much Sir..Stuff on Django really awesome, hoping more on Django!

  • @99phenomenon
    @99phenomenon ปีที่แล้ว

    Thank you, Man! That's solid!

  • @rangabharath4253
    @rangabharath4253 3 ปีที่แล้ว +1

    Awesome as always 👍😀

  • @Fanceh
    @Fanceh 3 ปีที่แล้ว +5

    Hey Zander, I've been watching your tutorials for a very long time! Tbh your video tutorials have taught a lot to me! Keep up the good work! ^^ Also, just a quick suggestion, could you make a tutorial on Django for crypto transactions? I think that would be a great intermediate project. Thanks for reading out this comment! :)

    • @veryacademy
      @veryacademy  3 ปีที่แล้ว +1

      Working as we speak - I need to finish some project first then, sure I will do a poll to see what everyone wants - will add this to the suggestions. Sounds like an interesting/relevant project, thank you. 👍

  • @AcademyOmen
    @AcademyOmen 3 ปีที่แล้ว +1

    Cool new stuffs💐

  • @nicenaija9952
    @nicenaija9952 3 ปีที่แล้ว +2

    Thank you. Please make a series on Scraping web and saving in Django database.

    • @veryacademy
      @veryacademy  3 ปีที่แล้ว +1

      I will do eventually, it’s on my future todo list

  • @MsSLOOM77
    @MsSLOOM77 หลายเดือนก่อน

    Thank you a lot

  • @user-ph7je6hv6n
    @user-ph7je6hv6n ปีที่แล้ว

    Thanks for the great videos! What if I need to create different objects with different model fields? To do this, you need to create parameterized factories?

  • @AdalV51
    @AdalV51 10 หลายเดือนก่อน +1

    Amazing tutorial! Also wanted to know, what's the theme you are using in VS Code? Looks really nice!

    • @veryacademy
      @veryacademy  10 หลายเดือนก่อน +1

      Thanks, theme is owl2 if I remember right

  • @amanjain6680
    @amanjain6680 3 ปีที่แล้ว +2

    it would help if you could reference your prev tutorial that you mention in this video, in description or i button

    • @veryacademy
      @veryacademy  3 ปีที่แล้ว

      On it right now - I am giving this a GitHub home

    • @veryacademy
      @veryacademy  3 ปีที่แล้ว

      github.com/veryacademy/pytest-django-course

  • @tynnikov
    @tynnikov 3 ปีที่แล้ว

    i use function create() and get error "Got an error creating the test database: permission denied to create database"

  • @ahmadirfan7840
    @ahmadirfan7840 3 ปีที่แล้ว +1

    Previously, when I was developed an e-commerce using Rails, I also used factory test but not factory boy. It’s factory girl. Well somehow, this video makes me think. Are factory boy and factory girl was developed by the same team or individual?

    • @veryacademy
      @veryacademy  3 ปีที่แล้ว +1

      Hi Ahmad - Yes Factory Boy was inspired from Factory Girl 👍

    • @ahmadirfan7840
      @ahmadirfan7840 3 ปีที่แล้ว

      @@veryacademy ooo.. got it..

  • @davidtaneja
    @davidtaneja 3 ปีที่แล้ว

    can we use any python library or open source library in our django project (in production or in web apps) ?

    Is there any issue for License or copyright ?

    • @veryacademy
      @veryacademy  3 ปีที่แล้ว

      Most packages on PyPi will indicate the licence requirements and provide details of what you need to do. Most packages are MIT - if you are not sure and taking to production on PyPi you can find a link to the author contact info - just ask 👍

  • @mueezkhan280
    @mueezkhan280 2 ปีที่แล้ว

    what is the purpose of using .build method at 16:16 , can someone please guide me ?

  • @theyzilay
    @theyzilay 2 ปีที่แล้ว

    why you didn't use factory.Faker instead of Faker?