Pytest | Django | Introducing Fixtures and Fixture Factory

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

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

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

    Underrated but one of the best development content channel! Hope that you reach great heights. Thank you for this amazing content!

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

    Thank you sir.
    Your tutorials are thorough, detail-oriented and at a moderate pace without making a beginner like me feel overwhelming.
    Wish your channels get more recognition.

  • @samuelebonini8004
    @samuelebonini8004 3 ปีที่แล้ว +13

    As a suggestion for a future video, I'd love to see something on generic relationships, and maybe a real-world possible use case example that goes beyond that's written in the official docs. Thank you for the quality content!

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

    i was really looking for a video like this since long on test cases .... so a big thank you Sir!! love from INDIA !

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

      Glad it was helpful!

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

    Maaan, I was looking for such clear explanation for 2 days. Thanks a lot!

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

    very very good series (especially giving chance to replicate the code) .Thanks a lot

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

    Awesome video, so well organized. Love this channel.

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

    This is great! Thank you!

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

      You're very welcome!

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

    what you mentioned at 19:10 - 19:25 about data persistence using factories,
    can you please guide me how it can be achieved ?

  • @you.coding
    @you.coding ปีที่แล้ว +1

    Can you please show how to connect to a PostgreSQL database during test? It doesn't connect to the default one automatically.

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

      Django will use the same connection settings as in your settings.py for tests, but will use a different database?

    • @you.coding
      @you.coding ปีที่แล้ว

      @@veryacademy well I have got the solution.
      If you use some remote postgres database like elephantsql or neon console, these database user doesn't have 'superuser' or 'createdb' permission to create a new test db inside it.
      So I use the '--reuse-db' argument during pytest command to use the main db as test db.
      ``` pytest -rP --reuse-db ```
      Hope I am doing it right way.
      Thanks

  • @gabrieltrouve2801
    @gabrieltrouve2801 ปีที่แล้ว

    thks i love your engligh lol It's very simple to understand (i'm french) haha

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

    Oh I was waiting for the solution to the error when scope "session" is used. I don't understand why it is not working

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

    Unique Content!

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

    Sir i am unable to use the set_password option , showing none type object has no attribute with set_password ... but the user is created succesfully i have printed , so why this is none ? no clue from google !

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

    Thank you!

  • @dodokwak
    @dodokwak 2 ปีที่แล้ว +1

    Thank you.

  • @adriangonzalez7857
    @adriangonzalez7857 2 ปีที่แล้ว +1

    How can I split fixtures in my django project? I mean, each app with its own fixtures

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

      Make a fixtures folder in each app and only load what you need

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

    😍😍😍

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

    sir plz make a video django with mako template

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

      Hi Sonu, just wondering why you are using mako? Not saying you shouldn't and so on - I really just wondered - such a niche template library.

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

      @@veryacademy sir plz make video django advance template concept

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

    But you didn't show how to create one User object with scope session, create one object for all test cases, btw it was good