本文整理汇总了Python中common.utilities.inversion_of_control.Dependency.notify_new_relic方法的典型用法代码示例。如果您正苦于以下问题:Python Dependency.notify_new_relic方法的具体用法?Python Dependency.notify_new_relic怎么用?Python Dependency.notify_new_relic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.utilities.inversion_of_control.Dependency
的用法示例。
在下文中一共展示了Dependency.notify_new_relic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CoreJenkinsDeploymentTest
# 需要导入模块: from common.utilities.inversion_of_control import Dependency [as 别名]
# 或者: from common.utilities.inversion_of_control.Dependency import notify_new_relic [as 别名]
class CoreJenkinsDeploymentTest(unittest.TestCase):
def setUp(self):
register_common_mock_dependencies()
self.deployment_provider = Dependency("DeploymentProvider").value
def doCleanups(self):
dependencies.clear()
def test_notify_new_relic(self):
response = self.deployment_provider.notify_new_relic("Mack Daddy App", "The daddy of the mack daddy", "Daddy Mack")
self.assertEqual(self.deployment_provider.new_relic_application_name, "Mack Daddy App")
self.assertEqual(self.deployment_provider.new_relic_deployment_description, "The daddy of the mack daddy")
self.assertEqual(self.deployment_provider.new_relic_api_key, "Daddy Mack")
# make sure we get an xml string back, with a <deployment> root node that has <id> and <timestamp> elements
tree = ET.fromstring(response)
self.assertEqual(tree.tag, "deployment")
self.assertEqual(tree.find("id").text, "1489838")
self.assertEqual(tree.find("timestamp").text, "2013-05-05T11:35:24-07:00")