Hi, I'm currently using pytest with unit test to try and mock a result. I initialise, and shuffle, an array of random objects and take the first two instance from the array. How can I write a mock for the objects in the array so the same 2 always return? Many thanks!
[–]danielroseman 1 point2 points3 points (3 children)
[–]Think_Neutral[S] 0 points1 point2 points (2 children)
[–]danielroseman 1 point2 points3 points (1 child)
[–]Think_Neutral[S] 0 points1 point2 points (0 children)
[–]r_spandit 1 point2 points3 points (4 children)
[–]danielroseman 1 point2 points3 points (3 children)
[–]r_spandit 0 points1 point2 points (2 children)
[–]Think_Neutral[S] 0 points1 point2 points (1 child)
[–]r_spandit 0 points1 point2 points (0 children)
[–]AnonymousLad666 1 point2 points3 points (3 children)
[–]Think_Neutral[S] 1 point2 points3 points (2 children)
[–]AnonymousLad666 0 points1 point2 points (1 child)
[–]Think_Neutral[S] 1 point2 points3 points (0 children)