mirror of https://github.com/zulip/zulip.git
test_import_export: Fix a flaky test due to random reactions added.
The reactions added to messages in the test database are random in nature, so there is a possibility of any number of reaction records in the exported user data. The test now verifies the reaction which was added in the test itself. Earlier, the test was assuming the reaction added in the test is the only record in the exported data. That would result in a flaky behavior. This commit fixes the flaky behavior.
This commit is contained in:
parent
20fbba6375
commit
6baf981aa5
|
@ -1908,9 +1908,8 @@ class SingleUserExportTest(ExportFile):
|
|||
@checker
|
||||
def zerver_reaction(records: List[Record]) -> None:
|
||||
assert reaction
|
||||
(exported_reaction,) = records
|
||||
self.assertEqual(
|
||||
exported_reaction,
|
||||
records[-1],
|
||||
dict(
|
||||
id=reaction.id,
|
||||
user_profile=cordelia.id,
|
||||
|
|
Loading…
Reference in New Issue