Django 1.4 - assertQuerysetEqual - how to use method

后端 未结 2 1478
庸人自扰
庸人自扰 2020-12-08 15:04

I\'m wondering how the TestCase.assertQuerysetEqual method works. I tried it in different ways, each of them leading me to another error message.

#create a b         


        
2条回答
  •  Happy的楠姐
    2020-12-08 15:49

    try this:

    self.assertQuerysetEqual(
        tree_record_qs,
        [repr(r) for r in tree_record_backup]
    )
    

    it's a bit weird and undocumented; but, that should work for you.

提交回复
热议问题