Replies: 1 comment
-
truth be told, I've never seen / used especially since it's used only testing so if it explodes at runtime, no big deal since it just fails the test I think your fix would work! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, thanks for your work on this repo. It's been very helpful!
I have a question about the best way to use
assertQuerysetEqual
in tests. I am following the Django tutorial here. It seems from the tutorial that I should be able to callassertQuerysetEqual
with something of typeList[Question]
, however this is not supported bydjango-types
.I have looked at the type stub and it seems to only allow lists with certain primitives or
Queryset[Any]
. Below is the stub I'm talking about:So, finally, my question is, what's the best way to use this function? In my test I've resorted to getting a
Queryset[Question]
object by doing the following:but it would be nicer just to use a list containing the question object like they do in the tutorial, like this:
Am I using this the wrong way, or could a
List[Any]
type be added to the stub?Many thanks,
Ross
Beta Was this translation helpful? Give feedback.
All reactions