本文整理汇总了Python中recurly.Account.notes方法的典型用法代码示例。如果您正苦于以下问题:Python Account.notes方法的具体用法?Python Account.notes怎么用?Python Account.notes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类recurly.Account
的用法示例。
在下文中一共展示了Account.notes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_account_notes
# 需要导入模块: from recurly import Account [as 别名]
# 或者: from recurly.Account import notes [as 别名]
def test_account_notes(self):
account1 = Account(account_code='note%s' % self.test_id)
account2 = Account(account_code='note%s' % self.test_id)
with self.mock_request('account-notes/account1-created.xml'):
account1.save()
with self.mock_request('account-notes/account2-created.xml'):
account2.save()
try:
with self.mock_request('account-notes/account1-note-list.xml'):
notes1 = account1.notes()
with self.mock_request('account-notes/account2-note-list.xml'):
notes2 = account2.notes()
# assert accounts don't share notes
self.assertNotEqual(notes1, notes2)
# assert contains the proper notes
self.assertEqual(notes1[0].message, "Python Madness")
self.assertEqual(notes1[1].message, "Some message")
self.assertEqual(notes2[0].message, "Foo Bar")
self.assertEqual(notes2[1].message, "Baz Boo Bop")
finally:
with self.mock_request('account-notes/account1-deleted.xml'):
account1.delete()
with self.mock_request('account-notes/account2-deleted.xml'):
account2.delete()