americanhandelsociety / americanhandelsociety-members

0 stars 0 forks source link

[Issue-117] fix flaky test #120

Closed ecedmondson closed 2 years ago

ecedmondson commented 2 years ago

The reason it was flaky is because I use two fixtures: one with artificially ackdated members, and one with the generic member fixture, who is not artificially backdated. The artificially backdated members do NOT evalutate to updated_past_month=True, but the other member does. Previously, I was choosing a random member to update from the entire queryset in the hopes of forcing that member to be presented in the set of updated_past_month=True. On occasions where the member who already evaluted to updated_past_month=True is chosen, then no data changes in the populated of the queryset occurred, resulting in the failure.