コード例 #1
0
 def assertValidExtension(self, extension, expected):
     super(JsonTestCase, self).assertValidExtension(extension)
     descriptions = [ext["description"] for ext in expected.itervalues()]
     description = extension.get("description")
     self.assertIsNotNone(description)
     self.assertIn(description, descriptions)
     self.assertIsNotNone(extension.get("links"))
     self.assertNotEmpty(extension.get("links"))
     for link in extension.get("links"):
         self.assertValidExtensionLink(link)
コード例 #2
0
 def assertValidExtension(self, extension, expected):
     super(JsonTestCase, self).assertValidExtension(extension)
     descriptions = [ext['description'] for ext in expected.itervalues()]
     description = extension.get('description')
     self.assertIsNotNone(description)
     self.assertIn(description, descriptions)
     self.assertIsNotNone(extension.get('links'))
     self.assertNotEmpty(extension.get('links'))
     for link in extension.get('links'):
         self.assertValidExtensionLink(link)
コード例 #3
0
    def assertValidExtension(self, extension):
        """Applicable to XML and JSON.

        However, navigating extension links differs between content types.
        They need to be validated separately with assertValidExtensionLink.

        """
        self.assertIsNotNone(extension)
        self.assertIsNotNone(extension.get("name"))
        self.assertIsNotNone(extension.get("namespace"))
        self.assertIsNotNone(extension.get("alias"))
        self.assertIsNotNone(extension.get("updated"))
コード例 #4
0
    def assertValidExtension(self, extension):
        """Applicable to XML and JSON.

        However, navigating extension links differs between content types.
        They need to be validated separately with assertValidExtensionLink.

        """
        self.assertIsNotNone(extension)
        self.assertIsNotNone(extension.get('name'))
        self.assertIsNotNone(extension.get('namespace'))
        self.assertIsNotNone(extension.get('alias'))
        self.assertIsNotNone(extension.get('updated'))