From 480e8997ec603483b991b356d96bb9106f7a0e01 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 25 Oct 2021 22:45:10 -0700 Subject: [PATCH] fix: A test (test_save_one_and_confirm) was flaky --- common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py index 0105733ba4..2d0ae75f9b 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py @@ -115,6 +115,8 @@ class TestMongoAssetMetadataStorage(TestCase): So we can use the below date comparison """ for attr in mdata1.ATTRS_ALLOWED_TO_UPDATE: # lint-amnesty, pylint: disable=redefined-outer-name + if attr == "edited_on": + continue # The edited_on gets updated during save, so comparing it makes tests flaky. if isinstance(getattr(mdata1, attr), datetime): self._assert_datetimes_equal(getattr(mdata1, attr), getattr(mdata2, attr)) else: