'Upload a asset file to assets
Arguments:
asset_filename (str): asset file name
asset_type (str): one of `handout`, `transcript`
index (int): query index'

def upload_asset(self, asset_filename, asset_type='handout', index=0):

    asset_file_path = self.file_path(asset_filename)
    self.click_button('upload_asset', index)
    self.q(css=CLASS_SELECTORS['attach_asset']).results[0].send_keys(asset_file_path)
    if ((asset_type == 'transcript') and self.q(css='#upload_error').present):
        return
    self.click_button('asset_submit')
    self._wait_for((lambda : (not self.q(css=CLASS_SELECTORS['upload_dialog']).present)), 'Upload    Completed')
