

def test_secondaryAuthorityServices(self):
    '\n        After parsing I{--secondary} options, L{Options} constructs a\n        L{SecondaryAuthorityService} instance for each configured secondary.\n        '
    options = Options()
    options.parseOptions(['--secondary', '1.2.3.4:5353/example.com', '--secondary', '1.2.3.5:5354/example.com'])
    self.assertEqual(len(options.svcs), 2)
    secondary = options.svcs[0]
    self.assertIsInstance(options.svcs[0], SecondaryAuthorityService)
    self.assertEqual(secondary.primary, '1.2.3.4')
    self.assertEqual(secondary._port, 5353)
    secondary = options.svcs[1]
    self.assertIsInstance(options.svcs[1], SecondaryAuthorityService)
    self.assertEqual(secondary.primary, '1.2.3.5')
    self.assertEqual(secondary._port, 5354)

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/names/test/test_tap.py OptionsTests.test_secondaryAuthorityServices/original