Django Testing Tutorial - Testing Models #4

Поділитися
Вставка
  • Опубліковано 4 гру 2024

КОМЕНТАРІ • 16

  • @thedumbfounds767
    @thedumbfounds767  6 років тому +1

    Happy Christmas to y'all! Who has some goals/plans ready for the next year? P.S.: Check me out on twitter: twitter.com/gabrimarcan Will be posting something there once in a while.

  • @ProSimples
    @ProSimples 4 роки тому +4

    I'd love if you have tests for standard models and many-to-many ones such as ForeignKey. There are
    almost no video about them.

  • @victoradukwu2719
    @victoradukwu2719 6 років тому +1

    Great videos. Really explanatory. Waiting for the video on testing templates.

    • @thedumbfounds767
      @thedumbfounds767  6 років тому +2

      Thanks, Victor! We'll mostly be testing templates through the selenium tests.

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

    very good tut.

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

    it's the best test-tutorial. it's video>Russians video

  • @ehsanahmadi8976
    @ehsanahmadi8976 2 роки тому +1

    Thanks👏

  • @thetruereality2
    @thetruereality2 4 роки тому +1

    Is there no video on how to do this on a windows machina?

  • @karthik7688
    @karthik7688 Рік тому

    Though I did the same as mentioned. I'm getting Ran 0 test cases. What should I do?

  • @saicharan4532
    @saicharan4532 2 роки тому +1

    Hi,it is a nice explanation, could anyone help me how to test a model field which has unique= true in test.py file

  • @mattcarter6453
    @mattcarter6453 4 роки тому

    does anyone know why when I do this I get a django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. Error?

  • @AdityaSingh-fk5vu
    @AdityaSingh-fk5vu 5 років тому

    The code is not there on your github. The repo doesn't have the test cases.

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

    def test_get_absolute_url(self):
    response = Project.objects.create(
    name = "project 2",
    budget = 1000
    )
    self.assertEquals(response.slug, response.name.replace(" ", "-"))
    #Correct me if i am wrong..

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

    Testing for gau is 'overboard'? Seriously?

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

    i write a little bit code for absolute_url function
    def test_absolute_slug(self):
    expected_url = f'/{self.project1.slug}'
    actual_url = self.project1.get_absolute_url()
    self.assertEquals(actual_url, expected_url, True)
    if something went wrong write comment

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

    def test_get_absolute_url(self):
    self.assertEquals(self.project1.get_absolute_url(), "/project-1")