示例#1
0
    def test_get_id(self):
        self.assertEqual(4, utils.get_id(4))

        class TmpObject(object):
            uuid = 4

        self.assertEqual(4, utils.get_id(TmpObject))
示例#2
0
 def delete(self, resource):
     return self._delete(FAKE_RESOURCE_ITEM_URL % utils.get_id(resource))
示例#3
0
 def update(self, resource, **kwargs):
     return self._update(FAKE_RESOURCE_ITEM_URL % utils.get_id(resource),
                         resource, **kwargs)
示例#4
0
 def update_all(self, resource, **kwargs):
     resource_url = FAKE_RESOURCE_ITEM_URL % utils.get_id(resource)
     return self._update_all(resource_url, resource, **kwargs)
示例#5
0
 def get(self, resource, **kwargs):
     resource_url = FAKE_RESOURCE_ITEM_URL % utils.get_id(resource)
     return self._get(resource_url, **kwargs)