def test_nsxv_str(self):
    # exp_info default is 2
    exp_info = 2
    pol = policy.ParsePolicy(nsxv_mocktest.MIXED_FILTER, self.defs, False)
    target = nsxv.Nsxv(pol, exp_info)

    #parse the xml and check the values
    root = ET.fromstring(str(target))
    # check section name
    section_name = {'id': '1009', 'name': 'Sample mixed NSXV filter'}
    self.assertEqual(root.attrib, section_name)
    # check name and action
    self.assertEqual(root.find('./rule/name').text, 'accept-to-honestdns')
    self.assertEqual(root.find('./rule/action').text, 'allow')

    #check IPV4 and IPV6 destinations
    exp_ipv4dest = ['8.8.4.4','8.8.8.8']
    exp_ipv6dest = ['2001:4860:4860::8844','2001:4860:4860::8888']

    for destination in root.findall('./rule/destinations/destination'):
      type = destination.find('type').text
      value = (destination.find('value').text)

      if 'Ipv4Address' in type:
        if value not in exp_ipv4dest:
          self.fail('IPv4Address not found in test_nsxv_str()')
      else:
        if value not in exp_ipv6dest:
          self.fail('IPv6Address not found in test_nsxv_str()')

    #check protocol
    protocol =  int(root.find('./rule/services/service/protocol').text)
    self.assertEqual(protocol, 17)

    # check destination port
    destination_port = root.find('./rule/services/service/destinationPort').text
    self.assertEqual(destination_port, '53')

    # check notes
    notes =  root.find('./rule/notes').text
    self.assertEqual(notes, 'Allow name resolution using honestdns.')
Update account password.
dataset/ETHPy150Open google/capirca/tests/nsxv_unittest.py/TermTest.test_nsxv_str--crossover with--dataset/ETHPy150Open IceCTF/ctf-platform/api/api/user.py/update_password_request