예제 #1
0
    def test_return_operation_with_the_same_values(self):
        operation = {
            "name": "monitor",
            "role": const.PCMK_ROLE_PROMOTED_LEGACY,
            "timeout": "10",
        }

        self.assertEqual(
            operation,
            {
                key: operations._normalize(key, value)
                for key, value in operation.items()
            },
        )
예제 #2
0
 def test_return_operation_with_normalized_values(self):
     self.assertEqual(
         {
             "name": "monitor",
             "role": const.PCMK_ROLE_PROMOTED_LEGACY,
             "timeout": "10",
             "on-fail": "ignore",
             "record-pending": "true",
             "enabled": "1",
         },
         {
             key: operations._normalize(key, value)
             for key, value in {
                 "name": "monitor",
                 "role": "master",
                 "timeout": "10",
                 "on-fail": "Ignore",
                 "record-pending": "True",
                 "enabled": "1",
             }.items()
         },
     )