Esempio n. 1
0
def test_issueslist_with_params(talker: Session) -> None:
    """Test the IssueList with params given."""
    params = {
        "series_name": "Kang",
    }
    issues = talker.issues_list(params=params)
    assert len(issues) == 5
    assert issues[0].issue_name == "Kang The Conqueror (2021) #1"
    assert issues[0].cover_date == date(2021, 10, 1)
Esempio n. 2
0
def test_multi_page_results(talker: Session) -> None:
    """Test for multi page results."""
    issues = talker.issues_list({
        "series_name": "action comics",
        "series_year_began": 1938
    })
    assert len(issues) == 864
    assert issues[0].issue_name == "Action Comics (1938) #1"
    assert issues[0].cover_date == date(1938, 6, 1)
    assert issues[863].issue_name == "Action Comics (1938) #904"
    assert issues[863].cover_date == date(2011, 10, 1)
Esempio n. 3
0
def test_issueslist(talker: Session) -> None:
    """Test the IssueList."""
    issues = talker.issues_list({
        "series_name": "action comics",
        "series_year_began": 2011
    })
    issue_iter = iter(issues)
    assert next(issue_iter).id == 6730
    assert next(issue_iter).id == 6731
    assert next(issue_iter).id == 6732
    assert len(issues) == 57
    assert issues[2].id == 6732
    assert issues[56].issue_name == "Action Comics (2011) #52"