本文整理匯總了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)