async def test_spot_groningen_sync(spot_processor: VenueProcessor,
                                   repositories: Repositories,
                                   client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/spot-groningen")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 20

    item = xml.find(
        "channel/item[link='https://www.spotgroningen.nl/programma/kamagurka/']"
    )
    assert item is not None
    assert item.find(
        "./title").text == "Kamagurka - De grenzen van de ernst [Spot NL-GRN]"
    assert item.find(
        "./link").text == "https://www.spotgroningen.nl/programma/kamagurka/"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid").text == "https://www.spotgroningen.nl/programma/kamagurka/"
    assert item.find(
        "./source").text == "https://www.spotgroningen.nl/programma"
    assert item.find(
        "./author").text == "https://www.spotgroningen.nl/programma"
    assert item.find("./pubDate").text is not None
Exemple #2
0
async def test_neushoorn_leeuwarden_sync(
        neushoorn_processor: VenueProcessor, repositories: Repositories,
        client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/neushoorn-leeuwarden")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 16
    item = xml.find(
        "channel/item[link='https://neushoorn.nl/production/uit-de-hoge-hoed-improv-comedy-11/']"
    )
    assert item is not None
    assert item.find(
        "./title").text == "Uit de Hoge Hoed: Improv Comedy [Neus NL-LEE]"
    assert item.find(
        "./link"
    ).text == "https://neushoorn.nl/production/uit-de-hoge-hoed-improv-comedy-11/"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid"
    ).text == "https://neushoorn.nl/production/uit-de-hoge-hoed-improv-comedy-11/"
    assert item.find("./source").text == "https://www.neushoorn.nl"
    assert item.find("./author").text == "https://www.neushoorn.nl"
    assert item.find("./pubDate").text is not None
async def test_vera_groningen_sync(vera_processor: VenueProcessor,
                                   repositories: Repositories,
                                   client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/vera-groningen")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 39
    item = xml.find(
        "channel/item[link='http://www.vera-groningen.nl/?post_type=events&p=107558&lang=nl']"
    )
    assert item is not None
    assert item.find(
        "./title").text == "Meadowlake (GRN) (VERPLAATST NAAR) [Vera NL-GRN]"
    assert item.find(
        "./link"
    ).text == "http://www.vera-groningen.nl/?post_type=events&p=107558&lang=nl"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid"
    ).text == "http://www.vera-groningen.nl/?post_type=events&p=107558&lang=nl"
    assert item.find(
        "./source").text == "https://www.vera-groningen.nl/programma/"
    assert item.find(
        "./author").text == "https://www.vera-groningen.nl/programma/"
    assert item.find("./pubDate").text is not None
async def test_hedon_zwolle_sync(hedon_processor: VenueProcessor,
                                 repositories: Repositories,
                                 client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/hedon-zwolle")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 105
    item = xml.find(
        "channel/item[link='https://www.hedon-zwolle.nl/voorstelling/30455/de-kift-']"
    )
    assert item is not None
    assert item.find("./title").text == "DE KIFT  [Hedon NL-ZWO]"
    assert item.find(
        "./link"
    ).text == "https://www.hedon-zwolle.nl/voorstelling/30455/de-kift-"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid"
    ).text == "https://www.hedon-zwolle.nl/voorstelling/30455/de-kift-"
    assert item.find(
        "./source").text == "https://www.hedon-zwolle.nl/#programma"
    assert item.find(
        "./author").text == "https://www.hedon-zwolle.nl/#programma"
    assert item.find("./pubDate").text is not None
Exemple #5
0
async def test_tivoli_utrecht_sync(tivoli_processor: VenueProcessor,
                                   repositories: Repositories,
                                   client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/tivoli-utrecht")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 92
    item = xml.find(
        "channel/item[link='https://www.tivolivredenburg.nl/agenda/bongeziwe-mabandla-27-06-2021/']"
    )
    assert item is not None
    assert item.find("./title").text == "Bongeziwe Mabandla [Tivoli NL-UTR]"
    assert item.find(
        "./link"
    ).text == "https://www.tivolivredenburg.nl/agenda/bongeziwe-mabandla-27-06-2021/"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid"
    ).text == "https://www.tivolivredenburg.nl/agenda/bongeziwe-mabandla-27-06-2021/"
    assert item.find(
        "./source").text == "https://www.tivolivredenburg.nl/agenda/"
    assert item.find(
        "./author").text == "https://www.tivolivredenburg.nl/agenda/"
    assert item.find("./pubDate").text is not None
Exemple #6
0
async def test_oost_groningen_sync(oost_processor: VenueProcessor,
                                   repositories: Repositories,
                                   client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/oost-groningen")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 8
    item = xml.find(
        "channel/item[link='https://www.facebook.com/events/610421539383220/']"
    )
    assert item is not None
    assert item.find(
        "./title"
    ).text == "HOMOOST • Movie Night: Party Monster the Shockumentary [Oost NL-GRN]"
    assert item.find(
        "./link").text == "https://www.facebook.com/events/610421539383220/"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid").text == "https://www.facebook.com/events/610421539383220/"
    assert item.find("./source").text == "https://www.komoost.nl"
    assert item.find("./author").text == "https://www.komoost.nl"
    assert item.find("./pubDate").text is not None
Exemple #7
0
async def test_paradiso_amsterdam_sync(
        paradiso_processor: VenueProcessor, repositories: Repositories,
        client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/paradiso-amsterdam")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 58
    item = xml.find(
        "channel/item[link='https://www.paradiso.nl/en/program/candy-dulfer-sax-candy-rock-n-roll-show-22-15-uur/85371']"
    )
    assert item is not None
    assert item.find(
        "./title"
    ).text == "Candy Dulfer - Sax, Candy & Rock-'n-Roll show - 22:15 uur [Paradiso NL-AMS]"
    assert (
        item.find("./link").text ==
        "https://www.paradiso.nl/en/program/candy-dulfer-sax-candy-rock-n-roll-show-22-15-uur/85371"
    )
    assert item.find("./description").text is not None
    assert (
        item.find("./guid").text ==
        "https://www.paradiso.nl/en/program/candy-dulfer-sax-candy-rock-n-roll-show-22-15-uur/85371"
    )
    assert item.find("./source").text == "https://www.paradiso.nl/"
    assert item.find("./author").text == "https://www.paradiso.nl/"
    assert item.find("./pubDate").text is not None
async def test_melkweg_amsterdam_sync(
    melkweg_processor: VenueProcessor, repositories: Repositories, client_session_mocker: ClientSessionMocker
):
    client_session_mocker.setup_client_session_for("tests/samples/melkweg-amsterdam")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 46
    item = xml.find("channel/item[link='https://www.melkweg.nl/nl/agenda/olga-gartland-10-11-2019']")
    assert item is not None
    assert item.find("./title").text == "Orla Gartland [Melkweg NL-AMS]"
    assert item.find("./link").text == "https://www.melkweg.nl/nl/agenda/olga-gartland-10-11-2019"
    assert item.find("./description").text is not None
    assert item.find("./guid").text == "https://www.melkweg.nl/nl/agenda/olga-gartland-10-11-2019"
    assert item.find("./source").text == "https://www.melkweg.nl/agenda"
    assert item.find("./author").text == "https://www.melkweg.nl/agenda"
    assert item.find("./pubDate").text is not None
Exemple #9
0
async def test_t013_tilburg_sync(
    t013_processor: VenueProcessor, repositories: Repositories, client_session_mocker: ClientSessionMocker
):
    client_session_mocker.setup_client_session_for("tests/samples/t013-tilburg")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 7
    item = xml.find("channel/item[link='https://www.013.nl/programma/5423/snelle']")
    assert item is not None
    assert item.find("./title").text == "Snelle + Pjotr [013 NL-TIL]"
    assert item.find("./link").text == "https://www.013.nl/programma/5423/snelle"
    assert item.find("./description").text is not None
    assert item.find("./guid").text == "https://www.013.nl/programma/5423/snelle"
    assert item.find("./source").text == "https://www.013.nl/programma"
    assert item.find("./author").text == "https://www.013.nl/programma"
    assert item.find("./pubDate").text is not None
Exemple #10
0
async def test_simplon_groningen_sync(
        simplon_processor: VenueProcessor, repositories: Repositories,
        client_session_mocker: ClientSessionMocker):
    client_session_mocker.setup_client_session_for(
        "tests/samples/simplon-groningen")
    result = await sync_venues()
    assert result == 1

    xml = await read_rss()
    assert_rss_channel(xml)

    assert len(xml.findall("channel/item")) == 29
    item = xml.find(
        "channel/item[link='http://simplon.nl/?post_type=events&p=17602']")
    assert item is not None
    assert item.find("./title").text == "Foxlane + Car Pets [Simplon NL-GRN]"
    assert item.find(
        "./link").text == "http://simplon.nl/?post_type=events&p=17602"
    assert item.find("./description").text is not None
    assert item.find(
        "./guid").text == "http://simplon.nl/?post_type=events&p=17602"
    assert item.find("./source").text == "https://www.simplon.nl"
    assert item.find("./author").text == "https://www.simplon.nl"
    assert item.find("./pubDate").text is not None