예제 #1
0
 def test_can_display_plain_constraint(self, mock_constraint_plain):
     mock_constraint_plain.return_value = "plain"
     self.assertEqual(
         'plain',
         console_report.constraint("rsc_ticket",
                                   "constraint_in_library_representation"))
     mock_constraint_plain.assert_called_once_with(
         "rsc_ticket", "constraint_in_library_representation", True)
예제 #2
0
 def test_can_display_constraint_with_set(self, mock_constraint_with_sets):
     mock_constraint_with_sets.return_value = "with_set"
     self.assertEqual(
         'with_set',
         console_report.constraint(
             "rsc_ticket",
             {"resource_sets": "some_resource_sets", "options": {"a": "b"}},
             with_id=False
         )
     )
     mock_constraint_with_sets.assert_called_once_with(
         {"resource_sets": "some_resource_sets", "options": {"a": "b"}},
         False
     )
예제 #3
0
 def test_can_display_plain_constraint(self, mock_constraint_plain):
     mock_constraint_plain.return_value = "plain"
     self.assertEqual(
         'plain',
         console_report.constraint(
             "rsc_ticket",
             "constraint_in_library_representation"
         )
     )
     mock_constraint_plain.assert_called_once_with(
         "rsc_ticket",
         "constraint_in_library_representation",
         True
     )
예제 #4
0
 def test_can_display_constraint_with_set(self, mock_constraint_with_sets):
     mock_constraint_with_sets.return_value = "with_set"
     self.assertEqual(
         'with_set',
         console_report.constraint("rsc_ticket", {
             "resource_sets": "some_resource_sets",
             "options": {
                 "a": "b"
             }
         },
                                   with_id=False))
     mock_constraint_with_sets.assert_called_once_with(
         {
             "resource_sets": "some_resource_sets",
             "options": {
                 "a": "b"
             }
         }, False)