'Helper method for:
1) importing course from xml
2) finding asset in course (verifying non-empty)
3) computing thumbnail location of asset
4) deleting the asset from the course'

def _delete_asset_in_course(self):

    asset_key = self.course.id.make_asset_key('asset', 'sample_static.html')
    content = StaticContent(asset_key, 'Fake    asset', 'application/text', 'test')
    contentstore().save(content)
    url = reverse_course_url('assets_handler', self.course.id, kwargs={'asset_key_string': unicode(asset_key)})
    resp = self.client.delete(url)
    self.assertEqual(resp.status_code, 204)
    return asset_key
