Exemple #1
0
def test_update_cached_counts_none(f_mock):
    p = Publisher()
    p.update_cached_counts({})

    assert p.brand_count == 0
    assert p.indicia_publisher_count == 0
    assert p.series_count == 0
    assert p.issue_count == 0
def test_update_cached_counts_none(f_mock):
    p = Publisher()
    p.update_cached_counts({})

    assert p.brand_count == 0
    assert p.indicia_publisher_count == 0
    assert p.series_count == 0
    assert p.issue_count == 0
Exemple #3
0
def test_update_cached_counts_subtract(f_mock):
    p = Publisher()
    p.update_cached_counts(DELTAS, negate=True)

    assert p.brand_count == BRAND_COUNT - DELTAS['brands']
    assert p.indicia_publisher_count == (IPUB_COUNT -
                                         DELTAS['indicia publishers'])
    assert p.series_count == SERIES_COUNT - DELTAS['series']
    assert p.issue_count == ISSUE_COUNT - DELTAS['issues']
def test_update_cached_counts_subtract(f_mock):
    p = Publisher()
    p.update_cached_counts(DELTAS, negate=True)

    assert p.brand_count == BRAND_COUNT - DELTAS['brands']
    assert p.indicia_publisher_count == (IPUB_COUNT -
                                         DELTAS['indicia publishers'])
    assert p.series_count == SERIES_COUNT - DELTAS['series']
    assert p.issue_count == ISSUE_COUNT - DELTAS['issues']