You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that the mock client uses the random package to generate new IDs for documents (specifically random.choice).
In my project, I am generating an ES document after each test is ran, and resetting the random package's seed before each test is ran (this part is out of my control). Since the mock client is using the random package to generate IDs, then this means it generates the same ID for every test, which is not ideal for testing my document posting. I wonder if there is a way around this?
I see that the mock client uses the
random
package to generate new IDs for documents (specificallyrandom.choice
).In my project, I am generating an ES document after each test is ran, and resetting the random package's seed before each test is ran (this part is out of my control). Since the mock client is using the random package to generate IDs, then this means it generates the same ID for every test, which is not ideal for testing my document posting. I wonder if there is a way around this?
Repro (test_repro.py):
Run with
Observe:
The text was updated successfully, but these errors were encountered: