def test_city_with_postcode(self, faker, num_samples):
    for _ in range(num_samples):
        city_with_postcode = faker.city_with_postcode()
        assert isinstance(city_with_postcode, str)
        match = re.fullmatch('\\d{4} (?P<city>.*)', city_with_postcode)
        assert (match.groupdict()['city'] in DeAtAddressProvider.cities)
def test_city_with_postcode(self, faker, num_samples):
    for _ in range(num_samples):
        city_with_postcode = faker.city_with_postcode()
        assert isinstance(city_with_postcode, str)
        match = re.fullmatch('\\d{4} (?P<city>.*)', city_with_postcode)
        assert (match.groupdict()['city'] in DeAtAddressProvider.cities)