本文整理汇总了Python中testing.builders.make_album函数的典型用法代码示例。如果您正苦于以下问题:Python make_album函数的具体用法?Python make_album怎么用?Python make_album使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_album函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_disables_isni_lookup_when_user_logs_out
def test_disables_isni_lookup_when_user_logs_out(driver):
session = make_registered_session()
_ = show_page(session=session, album=make_album(lead_performer="Album Artist"))
driver.shows_main_artist_isni_lookup_button(disabled=False)
session.logout()
driver.shows_main_artist_isni_lookup_button(disabled=True)
示例2: test_disables_main_artist_section_when_project_is_a_compilation
def test_disables_main_artist_section_when_project_is_a_compilation(driver):
_ = show_page(make_album(compilation=True), make_registered_session())
driver.shows_main_artist("Various Artists", disabled=True)
driver.shows_main_artist_region("__ ___", disabled=True)
driver.shows_main_artist_isni("", disabled=True)
driver.shows_main_artist_isni_lookup_button(disabled=True)
driver.shows_main_artist_date_of_birth("2000-01-01", disabled=True)
示例3: test_enables_isni_lookup_when_user_logs_in
def test_enables_isni_lookup_when_user_logs_in(driver):
session = make_anonymous_session()
_ = show_page(session=session, album=make_album(lead_performer="Album Artist"))
driver.shows_main_artist_isni_lookup_button(disabled=True)
session.login_as("[email protected]", "api-key", [Permission.lookup_isni.value])
driver.shows_main_artist_isni_lookup_button(disabled=False)
示例4: test_indicates_when_album_performed_by_various_artists
def test_indicates_when_album_performed_by_various_artists(driver):
track = make_track()
album = make_album(compilation=True, tracks=[track])
_ = show_page(album, track)
driver.shows_album_lead_performer("Various Artists")
示例5: test_disables_lead_performer_edition_when_album_is_not_a_compilation
def test_disables_lead_performer_edition_when_album_is_not_a_compilation(driver):
track = make_track()
album = make_album(lead_performer="Album Artist", compilation=False, tracks=[track])
_ = show_page(album, track)
driver.shows_lead_performer("Album Artist", disabled=True)
示例6: test_displays_undefined_lyrics_language_in_case_no_language_specified
def test_displays_undefined_lyrics_language_in_case_no_language_specified(driver):
track = make_track()
album = make_album(tracks=[track])
_ = show_page(album, track)
driver.shows_language("Undetermined")
示例7: test_signals_when_artwork_selected
def test_signals_when_artwork_selected(driver):
album = make_album()
signal = ValueMatcherProbe("select artwork")
_ = show_page(album, on_select_artwork=lambda: signal.received())
driver.add_artwork()
driver.check(signal)
示例8: test_updates_collaborators_identifiers
def test_updates_collaborators_identifiers(driver):
def isni_lookup(text):
return isnis.get(text)
def ipi_lookup(text):
return ipis.get(text)
isnis = {"Joel Miller": "000000123456789", "John Roney": "9876543210000000", "Rebecca Maloy": "0102030405060789"}
ipis = {"Joel Miller": "0102030405060789", "John Roney": "000000123456789", "Rebecca Maloy": "9876543210000000"}
track = make_track(lyricist=["Joel Miller"], composer=["John Roney"], publisher=["Rebecca Maloy"])
project = make_album(isnis=isnis, ipis=ipis, tracks=[track])
_ = show_page(track, on_isni_local_lookup=isni_lookup, on_ipi_local_lookup=ipi_lookup)
isnis["Joel Miller"] = "0000001234567891"
isnis["John Roney"] = "98765432100000001"
isnis["Rebecca Maloy"] = "01020304050607891"
ipis["Joel Miller"] = "01020304050607891"
ipis["John Roney"] = "0000001234567891"
ipis["Rebecca Maloy"] = "98765432100000001"
project.metadata_changed.emit(project)
driver.shows_row_details("Joel Miller", "01020304050607891", "0000001234567891")
driver.shows_role_on_row(0, "Author")
driver.shows_row_details("John Roney", "0000001234567891", "98765432100000001")
driver.shows_role_on_row(1, "Composer")
driver.shows_row_details("Rebecca Maloy", "98765432100000001", "01020304050607891")
driver.shows_role_on_row(2, "Publisher")
driver.has_contributors_count(3)
示例9: test_updates_track_list_when_album_metadata_change
def test_updates_track_list_when_album_metadata_change(driver):
album = make_album(tracks=[make_track(track_title="Chevere!"), make_track(track_title="Zumbar")])
_ = show_track_list_tab(album)
album.release_name = "Honeycomb"
driver.shows_tracks_in_order(["Chevere!", "Honeycomb"], ["Zumbar", "Honeycomb"])
示例10: test_closes_children_pages_on_close
def test_closes_children_pages_on_close(driver):
closed_signals = MultiValueMatcherProbe("closed pages", contains(
"track_edition_page_3",
"track_edition_page_2",
"track_edition_page_1",
"project_edition_page"))
def record_close(create_page):
@wraps(create_page)
def wrapper(*args, **kwargs):
page = create_page(*args, **kwargs)
page.closed.connect(lambda: closed_signals.received(page.objectName()))
return page
return wrapper
_ = show_project_screen(make_album(tracks=(make_track(), make_track(), make_track())),
record_close(create_project_page),
record_close(create_track_page))
driver.close()
driver.has_no_project_edition_page()
driver.has_no_track_edition_page()
driver.check(closed_signals)
示例11: test_displays_all_tracks_in_rows
def test_displays_all_tracks_in_rows(driver):
_ = show_track_list_tab(make_album(tracks=[make_track(track_title="Chevere!"),
make_track(track_title="Honeycomb")]))
driver.has_track_count(2)
driver.shows_tracks_in_order(["1", "Chevere!"],
["2", "Honeycomb"])
示例12: test_reorders_navigation_menu_when_moving_a_track
def test_reorders_navigation_menu_when_moving_a_track(driver):
album = make_album(tracks=[make_track(track_title="Chevere!"), make_track(track_title="That is that")])
_ = show_project_screen(album)
driver.shows_pages_in_navigation_combo("Project edition", "1 - Chevere!", "2 - That is that")
album.move_track(from_position=0, to_position=1)
driver.shows_pages_in_navigation_combo("Project edition", "1 - That is that", "2 - Chevere!")
示例13: test_updates_the_displayed_page_when_updating_track_title
def test_updates_the_displayed_page_when_updating_track_title(driver):
track = make_track(track_title="track 1")
_ = show_project_screen(make_album(tracks=[track]))
driver.shows_pages_in_navigation_combo("Project edition", "1 - track 1")
track.track_title = "Chevere!"
driver.shows_pages_in_navigation_combo("Project edition", "1 - Chevere!")
示例14: test_removes_track_menu_item_when_removing_a_track_from_the_project
def test_removes_track_menu_item_when_removing_a_track_from_the_project(driver):
album = make_album(tracks=[(make_track(track_title="Chevere!")), (make_track(track_title="That is that"))])
_ = show_project_screen(album)
driver.shows_pages_in_navigation_combo("Project edition", "1 - Chevere!", "2 - That is that")
album.remove_track(0)
driver.shows_pages_in_navigation_combo("Project edition", "1 - That is that")
示例15: test_indicates_whether_project_is_a_compilation
def test_indicates_whether_project_is_a_compilation(driver):
album = make_album(compilation=False)
_ = show_page(album)
driver.shows_compilation(False)
album.compilation = True
driver.shows_compilation(True)