예제 #1
0
 def test_validate_all_individual_options(self):
     self.assertEqual(
         ["REQUIRES REPORT", "ROLE REPORT"],
         sorted(operations.validate_operation({"name": "monitor"}, [
             mock.Mock(return_value=["ROLE REPORT"]),
             mock.Mock(return_value=["REQUIRES REPORT"]),
         ]))
     )
예제 #2
0
 def test_validate_all_individual_options(self):
     self.assertEqual(
         ["REQUIRES REPORT", "ROLE REPORT"],
         sorted(
             operations.validate_operation({"name": "monitor"}, [
                 mock.Mock(return_value=["ROLE REPORT"]),
                 mock.Mock(return_value=["REQUIRES REPORT"]),
             ])))
예제 #3
0
 def assert_operation_produces_report(self, operation, report_list):
     assert_report_item_list_equal(
         operations.validate_operation(
             operation,
             operations.OPERATION_OPTIONS_VALIDATORS
         ),
         report_list
     )