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

Поділитися
Вставка
  • Опубліковано 5 гру 2024
  • 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/ver...
    🐱‍🏍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

КОМЕНТАРІ • 29

  • @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 👍😀

  • @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

  • @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. 👍

  • @AdalV51
    @AdalV51 Рік тому +1

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

    • @veryacademy
      @veryacademy  Рік тому +1

      Thanks, theme is owl2 if I remember right

  • @АртемБеляков-к7з

    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?

  • @AcademyOmen
    @AcademyOmen 3 роки тому +1

    Cool new stuffs💐

  • @MsSLOOM77
    @MsSLOOM77 7 місяців тому

    Thank you a lot

  • @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

  • @mueezkhan280
    @mueezkhan280 2 роки тому

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

  • @SunnatchikSavriyev
    @SunnatchikSavriyev 2 місяці тому

    i don't unserstand where is come user_factory in 15:38 nerly minutes please describe this thanks

  • @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..

  • @tynnikov
    @tynnikov 3 роки тому

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

  • @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 👍

  • @theyzilay
    @theyzilay 2 роки тому

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