'Upload assets
:raise FixtureError:'

def _upload_assets(self):

    url = (STUDIO_BASE_URL + self._assets_url)
    test_dir = Path(__file__).abspath().dirname().dirname().dirname()
    for asset_name in self._assets:
        asset_file_path = ((test_dir + '/data/uploads/') + asset_name)
        asset_file = open(asset_file_path)
        files = {'file': (asset_name, asset_file, mimetypes.guess_type(asset_file_path)[0])}
        headers = {'Accept': 'application/json', 'X-CSRFToken': self.session_cookies.get('csrftoken', '')}
        upload_response = self.session.post(url, files=files, headers=headers)
        if (not upload_response.ok):
            raise FixtureError('Could    not    upload    {asset_name}    with    {url}.    Status    code:    {code}'.format(asset_name=asset_name, url=url, code=upload_response.status_code))
