def test_ServiceToStr(self):

    proto = 6
    icmp_types = []
    dports = [(1024, 65535)]
    spots = [(123, 123)]
    nsxv_term = nsxv.Term(nsxv_mocktest.INET_TERM, 'inet')
    service = nsxv_term._ServiceToString(proto, spots, dports, icmp_types)
    self.assertEquals(service, '<service><protocol>6</protocol><sourcePort>123</sourcePort><destinationPort>1024-65535</destinationPort></service>')
Create an url that refers to a specific version_number.
dataset/ETHPy150Open google/capirca/tests/nsxv_unittest.py/TermTest.test_ServiceToStr--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/api/views/versions.py/ViewBuilder.generate_href