test_compatibility: Mock desktop minimum versions.

This fixes the tests failing since
454eced466, in a way that won't require
us to change these tests for future version bumps.
This commit is contained in:
Tim Abbott 2021-05-13 13:03:39 -07:00
parent 3edb9b8ed6
commit 6e9683fe6f
1 changed files with 2 additions and 0 deletions

View File

@ -109,6 +109,8 @@ class CompatibilityTest(ZulipTestCase):
else:
assert False # nocoverage
@mock.patch("zerver.views.compatibility.DESKTOP_MINIMUM_VERSION", "5.0.0")
@mock.patch("zerver.views.compatibility.DESKTOP_WARNING_VERSION", "5.2.0")
def test_insecure_desktop_app(self) -> None:
self.assertEqual(is_outdated_desktop_app("ZulipDesktop/0.5.2 (Mac)"), (True, True, True))
self.assertEqual(