def METHOD_NAME(self):
    rtype = 'CompositeResource'
    title = 'My Test resource'
    params = {'resource_type': rtype,
              'title': title,
              'file': ('cea.tif',
                       open('hs_core/tests/data/cea.tif', 'rb'),
                       'image/tiff')}
    url = '/hsapi/resource/'
    response = self.client.post(url, params)
    self.assertEqual(response.status_code, status.HTTP_201_CREATED)
    content = json.loads(response.content.decode())
    res_id = content['resource_id']
    self.resources_to_delete.append(res_id)
    url2 = str.format('/hsapi/resource/{}/folders/foo/', res_id)
    # should not be able to ls non-existent folder
    response = self.client.get(url2, {})
    self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
    # should not be able to delete non-existent folder
    response = self.client.delete(url2, {})
    self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
    # create a folder
    response = self.client.put(url2, {})
    self.assertEqual(response.status_code, status.HTTP_201_CREATED)
    # should not be able to create the same folder again
    response = self.client.put(url2, {})
    self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
    # list that folder: should work, should be empty
    response = self.client.get(url2, {})
    content = json.loads(response.content.decode())
    self.assertEqual(len(content['folders']), 0)
    self.assertEqual(len(content['files']), 0)
    # delete that folder: should be possible
    response = self.client.delete(url2, {})
    self.assertEqual(response.status_code, status.HTTP_200_OK)
    # should not be able to ls non-existent folder
    response = self.client.get(url2, {})
    self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)