Esempio n. 1
0
def test_location_utility_slugify_location_city(city: str):
    """Negative testing for :py:meth:`wwdtm.location.LocationUtility.slugify_location`
    with city name

    :param city: City to include in the slug string
    """
    with pytest.raises(ValueError):
        utility = LocationUtility(connect_dict=get_connect_dict())
        slug = utility.slugify_location(city=city)

        assert slug, "Unable to convert into a slug string"
        assert isinstance(slug, str), "Value returned is not a string"
Esempio n. 2
0
def test_location_utility_slugify_location_venue_city_state(
    venue: str, city: str, state: str
):
    """Testing for :py:meth:`wwdtm.location.LocationUtility.slugify_location`

    :param venue: Venue name to include in the slug string
    :param city: City to include in the slug string
    :param state: State to include in the slug string
    """
    utility = LocationUtility(connect_dict=get_connect_dict())
    slug = utility.slugify_location(venue=venue, city=city, state=state)

    assert slug, "Unable to convert into a slug string"
    assert isinstance(slug, str), "Value returned is not a string"