Beispiel #1
0
 def test_format_reason_with_false_create__reason_in_runnable_object(self):
     self.runnable_object_mock.__create_reason__ = False
     self.reason = reason.create(self.runnable_object_mock,
                                 self.reason_name)
     test_format_reason_value = u'test'
     self.assertEqual(reason.format_reason(self.reason),
                      test_format_reason_value)
Beispiel #2
0
 def test_create(self):
     test_create_value = reason.Reason(self.runnable_object_dummy,
                                       self.reason_name,
                                       self.config_object_dummy)
     self.assertEqual(
         reason.create(self.runnable_object_dummy, self.reason_name,
                       self.config_object_dummy).__dict__,
         test_create_value.__dict__)
Beispiel #3
0
 def test_prop_config_none(self):
     self.reason = reason.create(self.runnable_object_dummy,
                                 self.reason_name)
     self.assertIsNone(self.reason.config)
Beispiel #4
0
 def test_prop_config(self):
     self.reason = reason.create(self.runnable_object_dummy,
                                 self.reason_name, self.config_object_dummy)
     self.assertEqual(self.reason.config, self.config_object_dummy)
Beispiel #5
0
 def test_prop_reason(self):
     self.reason = reason.create(self.runnable_object_dummy,
                                 self.reason_name)
     self.assertEqual(self.reason.reason, self.reason_name)
Beispiel #6
0
 def test_format_reason_to_output(self):
     self.reason = reason.create(self.runnable_object_dummy,
                                 self.reason_name)
     test_format_reason_value = u'==\n{}\n==\ntest'
     self.assertEqual(reason.format_reason_to_output(self.reason),
                      test_format_reason_value)