[extensions-web] extensions: Add tests for shell_versions_json
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] extensions: Add tests for shell_versions_json
- Date: Sat, 3 Mar 2012 11:17:15 +0000 (UTC)
commit 16d21a60053b4673fd5f162f7a6df95e73158526
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Mar 3 06:14:27 2012 -0500
extensions: Add tests for shell_versions_json
More coverage
sweettooth/extensions/tests.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index c36cbf5..87f6ce1 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -69,6 +69,18 @@ class ExtensionPropertiesTest(BasicUserTestCase, TestCase):
extension = models.Extension.objects.create_from_metadata(metadata, creator=self.user)
self.assertEquals(extension.first_line_of_description, "")
+ def test_shell_versions_json(self):
+ metadata = {"uuid": "test-metadata mecheye net",
+ "name": "Test Metadata",
+ "shell-version": ["3.2", "3.2.1"]}
+
+ extension = models.Extension.objects.create_from_metadata(metadata, creator=self.user)
+ version = models.ExtensionVersion.objects.create(extension=extension,
+ status=models.STATUS_NEW)
+ version.parse_metadata_json(metadata)
+
+ self.assertEquals(version.shell_versions_json, '["3.2", "3.2.1"]')
+
class ParseZipfileTest(BasicUserTestCase, TestCase):
def test_simple_metadata(self):
metadata = {"uuid": "test-metadata mecheye net",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]