本文整理汇总了Python中azure.cli.application.Application.todict方法的典型用法代码示例。如果您正苦于以下问题:Python Application.todict方法的具体用法?Python Application.todict怎么用?Python Application.todict使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类azure.cli.application.Application
的用法示例。
在下文中一共展示了Application.todict方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_application_todict_dict_with_obj
# 需要导入模块: from azure.cli.application import Application [as 别名]
# 或者: from azure.cli.application.Application import todict [as 别名]
def test_application_todict_dict_with_obj(self):
MyObject = namedtuple('MyObject', 'a b')
mo = MyObject('x', 'y')
the_input = {'a': mo}
actual = Application.todict(the_input)
expected = {'a': {'a': 'x', 'b': 'y'}}
self.assertEqual(actual, expected)
示例2: test_application_todict_dict
# 需要导入模块: from azure.cli.application import Application [as 别名]
# 或者: from azure.cli.application.Application import todict [as 别名]
def test_application_todict_dict(self):
the_input = {'a': 'b'}
actual = Application.todict(the_input)
expected = {'a': 'b'}
self.assertEqual(actual, expected)
示例3: test_application_todict_list
# 需要导入模块: from azure.cli.application import Application [as 别名]
# 或者: from azure.cli.application.Application import todict [as 别名]
def test_application_todict_list(self):
the_input = [{'a': 'b'}]
actual = Application.todict(the_input)
expected = [{'a': 'b'}]
self.assertEqual(actual, expected)
示例4: test_application_todict_none
# 需要导入模块: from azure.cli.application import Application [as 别名]
# 或者: from azure.cli.application.Application import todict [as 别名]
def test_application_todict_none(self):
the_input = None
actual = Application.todict(the_input)
expected = None
self.assertEqual(actual, expected)