Example #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))
Example #2
0
 def delete(self, resource):
     return self._delete(FAKE_RESOURCE_ITEM_URL % utils.get_id(resource))
Example #3
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)
Example #4
0
 def update(self, resource, **kwargs):
     return self._update(FAKE_RESOURCE_ITEM_URL % utils.get_id(resource),
                         resource, **kwargs)
Example #5
0
 def get(self, resource, **kwargs):
     resource_url = FAKE_RESOURCE_ITEM_URL % utils.get_id(resource)
     return self._get(resource_url, **kwargs)