def test_srvDifferentPriorities(self):
        """
        Two records with differing priorities compare on priority (ascending).
        """
        record1 = dns.Record_SRV(10, 0, 5222, 'host1.example.org')
        record2 = dns.Record_SRV(20, 0, 5222, 'host2.example.org')

        self.connector.orderedServers = [record2, record1]
        self.connector.servers = []
        self.patch(random, 'randint', self._randint)
        self.randIntResults = [0, 0]

        self.assertEqual(('host1.example.org', 5222),
                         self.connector.pickServer())

        self.assertEqual(('host2.example.org', 5222),
                         self.connector.pickServer())

        Two records with differing priorities compare on priority (ascending).
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_srvconnect.py