# HG changeset patch # User RhodeCode Admin # Date 2023-01-30 14:24:14 # Node ID fb2e5384131ce0ea561b6336a040502784a5f1aa # Parent 15c2a8b810dac890b558af1d8f7360f553d7a485 tests: fixed random fail of flacky test diff --git a/rhodecode/apps/repository/tests/test_repo_pullrequests.py b/rhodecode/apps/repository/tests/test_repo_pullrequests.py --- a/rhodecode/apps/repository/tests/test_repo_pullrequests.py +++ b/rhodecode/apps/repository/tests/test_repo_pullrequests.py @@ -21,9 +21,10 @@ import mock import pytest import rhodecode +from rhodecode.lib import helpers as h from rhodecode.lib.vcs.backends.base import MergeResponse, MergeFailureReason from rhodecode.lib.vcs.nodes import FileNode -from rhodecode.lib import helpers as h +from rhodecode.lib.ext_json import json from rhodecode.model.changeset_status import ChangesetStatusModel from rhodecode.model.db import ( PullRequest, ChangesetStatus, UserLog, Notification, ChangesetComment, Repository) @@ -1431,7 +1432,7 @@ class TestPullrequestsView(object): 'csrf_token': csrf_token}) assert response.status_int == 200 - assert response.body == '{"response": true, "redirect_url": null}' + assert json.loads(response.body) == json.loads('{"response": true, "redirect_url": null}') # Make sure that after update, it won't raise 500 errors response = self.app.get(route_path(