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)
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__)
def test_prop_config_none(self): self.reason = reason.create(self.runnable_object_dummy, self.reason_name) self.assertIsNone(self.reason.config)
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)
def test_prop_reason(self): self.reason = reason.create(self.runnable_object_dummy, self.reason_name) self.assertEqual(self.reason.reason, self.reason_name)
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)