[extensions-web/wip/api/v1: 27/28] extensions: update test for changed view
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/wip/api/v1: 27/28] extensions: update test for changed view
- Date: Sun, 29 May 2022 13:20:39 +0000 (UTC)
commit a95a511e4be59f83fa530bbcd22d01b93bc137e4
Author: Daniel Landau <daniel landau fi>
Date: Mon Apr 12 00:11:06 2021 +0300
extensions: update test for changed view
sweettooth/extensions/tests.py | 46 +++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index 1b30faa..af978ca 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -697,30 +697,30 @@ class QueryExtensionsTest(BasicUserTestCase, TestCase):
v = models.ExtensionVersion.objects.create(extension=extension, status=models.STATUS_ACTIVE)
v.parse_metadata_json({"shell-version": ["40"]})
- self.assertEqual(views.grab_proper_extension_version(extension, "3.17.1").version, 3)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.20.0").version, 4)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.2.0"), None)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.4.0"), None)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.20.1"), None)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.4.0", True).version, 1)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.7.4.1", True).version, 1)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.17.1", True).version, 3)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.20.0", True).version, 4)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.2.0", True), None)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.4.0", True), None)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.20.1", True), None)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.4.0", False).version, 1)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.7.4.1", False).version, 1)
self.assertEqual(views.grab_proper_extension_version(extension, "3.10.0", True).version, 1)
self.assertEqual(views.grab_proper_extension_version(extension, "3.10.0", False).version, 1)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.11.2", True).version, 1)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.13.4", True).version, 2)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.15.1", True).version, 2)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.15.2", True).version, 2)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.15.3", True).version, 2)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.16", True).version, 3)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.16.1", True).version, 3)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.16.2", True).version, 3)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.17.3", True).version, 3)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.18.3", True).version, 3)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.20.0", True).version, 4)
- self.assertEqual(views.grab_proper_extension_version(extension, "3.24.0", True).version, 4)
- self.assertEqual(views.grab_proper_extension_version(extension, "40.alpha", True).version, 6)
- self.assertEqual(views.grab_proper_extension_version(extension, "40.beta", True).version, 6)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.11.2", False).version, 1)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.13.4", False).version, 2)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.15.1", False).version, 2)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.15.2", False).version, 2)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.15.3", False).version, 2)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.16", False).version, 3)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.16.1", False).version, 3)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.16.2", False).version, 3)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.17.3", False).version, 3)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.18.3", False).version, 3)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.20.0", False).version, 4)
+ self.assertEqual(views.grab_proper_extension_version(extension, "3.24.0", False).version, 4)
+ self.assertEqual(views.grab_proper_extension_version(extension, "40.alpha", False).version, 6)
+ self.assertEqual(views.grab_proper_extension_version(extension, "40.beta", False).version, 6)
self.assertEqual(views.grab_proper_extension_version(extension, "40.2", True).version, 6)
self.assertEqual(views.grab_proper_extension_version(extension, "40.2", False).version, 6)
- self.assertEqual(views.grab_proper_extension_version(extension, "44.2", True).version, 5)
- self.assertEqual(views.grab_proper_extension_version(extension, "129.rc", True).version, 5)
+ self.assertEqual(views.grab_proper_extension_version(extension, "44.2", False).version, 5)
+ self.assertEqual(views.grab_proper_extension_version(extension, "129.rc", False).version, 5)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]