def test_address(self, faker, num_samples):
    for _ in range(num_samples):
        address = faker.address()
        match = self.address_pattern.fullmatch(address)
        street_address = match.group('street_address')
        lgu = match.group('lgu')
        postcode = match.group('postcode')
        province = match.group('province')
        assert match
        assert street_address
        assert ((lgu in self.province_lgus) or (lgu in self.metro_manila_lgus))
        assert (int(postcode) in self.postcodes)
        assert ((province in self.provinces) or (province == 'Metro Manila'))
def test_address(self, faker, num_samples):
    for _ in range(num_samples):
        address = faker.address()
        match = self.address_pattern.fullmatch(address)
        street_address = match.group('street_address')
        lgu = match.group('lgu')
        postcode = match.group('postcode')
        province = match.group('province')
        assert match
        assert street_address
        assert ((lgu in self.province_lgus) or (lgu in self.metro_manila_lgus))
        assert (int(postcode) in self.postcodes)
        assert ((province in self.provinces) or (province == 'Metro Manila'))