def contains_components(self, address, components):
expected = len(components)<EOL>got = <NUM_LIT:0><EOL>parsed = parse_address(address)<EOL>self.assertTrue(parsed)<EOL>for s, c in parsed:<EOL><INDENT>if components.get(c, None) == s:<EOL><INDENT>got += <NUM_LIT:1><EOL><DEDENT><DEDENT>self.assertEqual(expected, got)<EOL>
Test whether address parse contains specific components.