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
Not sure if I'm using the package correctly.
I have a use case where I want to test several functionality on the same collection of the database. I find it useful for each test to populate the same collection with different data, separately. For this I have some test functions (test_1, test_2 and test_3) and appropriate data in files data_for_test_1.json, data_for_test_2.json and data_for_test_3.json, so that each file contains tailored data for the appropriate test case. I want the same collection of the mongodb fixture to contain different data, based on the test case. Is there an easy way to achieve this or is this even an intended use case? From the documentation I read:
The collection that these documents are being inserted into is given by the filename of your fixture-file.
I wrote another fixture that uses the load_fixture function from the package with optional collection and file name that creates an empty data base and populates the given collection with the data from the given file.
Do you think this is intended and useful for other users, as well? I could implement it.
The text was updated successfully, but these errors were encountered:
Not sure if I'm using the package correctly.
I have a use case where I want to test several functionality on the same collection of the database. I find it useful for each test to populate the same collection with different data, separately. For this I have some test functions (
test_1
,test_2
andtest_3
) and appropriate data in filesdata_for_test_1.json
,data_for_test_2.json
anddata_for_test_3.json
, so that each file contains tailored data for the appropriate test case. I want the same collection of themongodb
fixture to contain different data, based on the test case. Is there an easy way to achieve this or is this even an intended use case? From the documentation I read:I wrote another fixture that uses the
load_fixture
function from the package with optional collection and file name that creates an empty data base and populates the given collection with the data from the given file.Do you think this is intended and useful for other users, as well? I could implement it.
The text was updated successfully, but these errors were encountered: