示例#1
0
 def test_get_definition(self):
     self.assertEqual(
         capabilities.get_capabilities_definition(),
         [
             {
                 "id": "test.in-pcs",
                 "in-pcs": "1",
                 "in-pcsd": "0",
                 "description": "This capability is available in pcs.",
             },
             {
                 "id": "test.in-pcsd",
                 "in-pcs": "0",
                 "in-pcsd": "1",
                 "description": "This capability is available in pcsd.",
             },
             {
                 "id":
                 "test.both",
                 "in-pcs":
                 "1",
                 "in-pcsd":
                 "1",
                 "description":
                 ("This capability is available in both pcs and pcsd."),
             },
             {
                 "id": "test.empty-description",
                 "in-pcs": "1",
                 "in-pcsd": "1",
                 "description": "",
             },
             {
                 "id": "test.no-description",
                 "in-pcs": "1",
                 "in-pcsd": "1",
                 "description": "",
             },
         ],
     )
示例#2
0
 def test_get_definition(self):
     self.assertEqual(
         capabilities.get_capabilities_definition(),
         [
             {
                 "id": "test.in-pcs",
                 "in-pcs": "1",
                 "in-pcsd": "0",
                 "description": "This capability is available in pcs.",
             },
             {
                 "id": "test.in-pcsd",
                 "in-pcs": "0",
                 "in-pcsd": "1",
                 "description": "This capability is available in pcsd.",
             },
             {
                 "id": "test.both",
                 "in-pcs": "1",
                 "in-pcsd": "1",
                 "description":
                     "This capability is available in both pcs and pcsd.",
             },
             {
                 "id": "test.empty-description",
                 "in-pcs": "1",
                 "in-pcsd": "1",
                 "description": "",
             },
             {
                 "id": "test.no-description",
                 "in-pcs": "1",
                 "in-pcsd": "1",
                 "description": "",
             },
         ]
     )