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