本文整理汇总了Python中fitbit.Fitbit.delete_foods_log方法的典型用法代码示例。如果您正苦于以下问题:Python Fitbit.delete_foods_log方法的具体用法?Python Fitbit.delete_foods_log怎么用?Python Fitbit.delete_foods_log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fitbit.Fitbit
的用法示例。
在下文中一共展示了Fitbit.delete_foods_log方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delete_water
# 需要导入模块: from fitbit import Fitbit [as 别名]
# 或者: from fitbit.Fitbit import delete_foods_log [as 别名]
def test_delete_water(self):
log_id = "fake_log_id"
# We need to mock _DELETE_COLLECTION_RESOURCE before we create the Fitbit object,
# since the __init__ is going to set up references to it
with mock.patch('fitbit.api.Fitbit._DELETE_COLLECTION_RESOURCE') as delete_resource:
delete_resource.return_value = 999
fb = Fitbit('x', 'y')
retval = fb.delete_foods_log(log_id=log_id)
args, kwargs = delete_resource.call_args
self.assertEqual(('foods/log',), args)
self.assertEqual({'log_id': log_id}, kwargs)
self.assertEqual(999, retval)