本文整理匯總了Python中xblock.core.XBlock.needs方法的典型用法代碼示例。如果您正苦於以下問題:Python XBlock.needs方法的具體用法?Python XBlock.needs怎麽用?Python XBlock.needs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類xblock.core.XBlock
的用法示例。
在下文中一共展示了XBlock.needs方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_no_i18n
# 需要導入模塊: from xblock.core import XBlock [as 別名]
# 或者: from xblock.core.XBlock import needs [as 別名]
def test_no_i18n(self):
"""
Test that the studio_view doesn't call block.ugettext since the block hasn't indicated
@XBlock.wants("i18n") or @XBlock.needs("i18n")
"""
with mock.patch.object(EditableXBlock, "ugettext") as mock_ugettext:
self.set_up_root_block()
mock_ugettext.assert_not_called()