def create_artist(element, all_elements): A = Artist(visible=True) title = element.findtext('title') try: A.first_name, A.last_name = title.split() except ValueError: A.last_name = title A.visible = False A.save() old_path = helpers.path_from_element(element) add_old_url(A, 'get_absolute_url', old_path) return A
def test_resume(self): Artist = ArtistFactory(resume='_') assert Artist.get_resume_url() == Artist.get_resume_page_url()
def test_resume_file(self): Artist = ArtistFactory() Artist.resume_file.save('file.txt', ContentFile("my string content")) assert Artist.get_resume_url() == Artist.resume_file.url