本文整理汇总了Python中telegram.ext.Filters.successful_payment方法的典型用法代码示例。如果您正苦于以下问题:Python Filters.successful_payment方法的具体用法?Python Filters.successful_payment怎么用?Python Filters.successful_payment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类telegram.ext.Filters
的用法示例。
在下文中一共展示了Filters.successful_payment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_filters_successful_payment
# 需要导入模块: from telegram.ext import Filters [as 别名]
# 或者: from telegram.ext.Filters import successful_payment [as 别名]
def test_filters_successful_payment(self, message):
assert not Filters.successful_payment(message)
message.successful_payment = 'test'
assert Filters.successful_payment(message)
示例2: test_filters_successful_payment
# 需要导入模块: from telegram.ext import Filters [as 别名]
# 或者: from telegram.ext.Filters import successful_payment [as 别名]
def test_filters_successful_payment(self):
self.message.successful_payment = 'test'
self.assertTrue(Filters.successful_payment(self.message))
self.message.successful_payment = None
self.assertFalse(Filters.successful_payment(self.message))