Ejemplo n.º 1
0
def test_venue_address(paid_meetup_event_json):
    """Test getting the venue address from Meetup event JSON."""
    meetup_event = MeetupEvent(paid_meetup_event_json)
    expected_venue = MeetupVenue("Nova Labs Inc.",
                                 "1916 Isaac Newton Square W", "Reston", "VA",
                                 "20190")
    assert meetup_event.venue == expected_venue
Ejemplo n.º 2
0
def test_photo_url(free_meetup_event_json):
    """Test getting the highest resolution featured photo URL."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    assert (
        meetup_event.photo_url ==
        "https://secure.meetupstatic.com/photos/event/6/b/4/9/highres_491187465.jpeg"
    )
Ejemplo n.º 3
0
def free_meetup_event(free_meetup_event_json):
    return MeetupEvent(free_meetup_event_json)
Ejemplo n.º 4
0
def test_photo_url_missing(paid_meetup_event_json):
    """Test getting the missing highest resolution featured photo URL."""
    meetup_event = MeetupEvent(paid_meetup_event_json)
    assert meetup_event.photo_url is None
Ejemplo n.º 5
0
def test_duration(free_meetup_event_json):
    """Test getting the duration from Meetup event JSON."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    assert meetup_event.duration == 7200000
Ejemplo n.º 6
0
def paid_event_adaptor(paid_meetup_event_json):
    meetup_event = MeetupEvent(paid_meetup_event_json)
    return MeetupToApricotEventAdaptor(meetup_event, None, EXPECTED_TAGS)
Ejemplo n.º 7
0
def test_name(free_meetup_event_json):
    """Test getting the name from Meetup event JSON."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    assert meetup_event.name == "AC: Mending Monday (Test Event)"
Ejemplo n.º 8
0
def much_later_free_meetup_event(much_later_free_meetup_event_json):
    return MeetupEvent(much_later_free_meetup_event_json)
Ejemplo n.º 9
0
def test_find_us(free_meetup_event_json):
    """Test getting the find us from Meetup event JSON."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    assert (
        meetup_event.find_us ==
        "https://zoom.us/j/92758362882?pwd=a2VJOGxyOTBqelNhdjY1dGpqZStjZz09")
Ejemplo n.º 10
0
def test_meetup_id(free_meetup_event_json):
    """Test getting the meetup ID from Meetup event JSON."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    assert meetup_event.meetup_id == "pfsbvrybcpbmb"
Ejemplo n.º 11
0
def test_end_time(free_meetup_event_json):
    """Test getting the end time from Meetup event JSON."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    assert meetup_event.end_time == datetime.fromisoformat(
        "2020-11-09 21:00 -05:00")
Ejemplo n.º 12
0
def test_accounting_codes_multiple():
    """Test getting multiple accounting codes."""
    meetup_event = MeetupEvent({"name": "BL_MW_X: Two codes in event name"})
    assert meetup_event.accounting_codes == ["BL", "MW", "X"]
Ejemplo n.º 13
0
def test_accounting_codes_missing():
    """Test getting a missing accounting code."""
    meetup_event = MeetupEvent({"name": "NO code in event name"})
    assert meetup_event.accounting_codes == []
Ejemplo n.º 14
0
def longer_free_meetup_event(longer_free_meetup_event_json):
    return MeetupEvent(longer_free_meetup_event_json)
Ejemplo n.º 15
0
def test_later_start_time(later_free_meetup_event_json):
    """Test getting the start time from Meetup event JSON."""
    meetup_event = MeetupEvent(later_free_meetup_event_json)
    assert meetup_event.start_time == datetime.fromisoformat(
        "2020-11-16 19:00 -05:00")
Ejemplo n.º 16
0
def later_free_meetup_event(later_free_meetup_event_json):
    return MeetupEvent(later_free_meetup_event_json)
Ejemplo n.º 17
0
def test_venue_online(free_meetup_event_json):
    """Test getting the online venue from Meetup event JSON."""
    meetup_event = MeetupEvent(free_meetup_event_json)
    expected_venue = MeetupVenue("Online event", "", "", "", "")
    assert meetup_event.venue == expected_venue
Ejemplo n.º 18
0
def paid_meetup_event(paid_meetup_event_json):
    return MeetupEvent(paid_meetup_event_json)
Ejemplo n.º 19
0
def free_event_adaptor(free_meetup_event_json):
    meetup_event = MeetupEvent(free_meetup_event_json)
    return MeetupToApricotEventAdaptor(
        meetup_event, EXPECTED_FREE_PHOTO_PATH, EXPECTED_FREE_TAGS
    )