@@ -419,43 +419,6 @@ def test_register_and_lookup_type_by_uppercase_name(self):
419419 zc .close ()
420420
421421
422- class TestServiceRegistry (unittest .TestCase ):
423- def test_only_register_once (self ):
424- type_ = "_test-srvc-type._tcp.local."
425- name = "xxxyyy"
426- registration_name = "%s.%s" % (name , type_ )
427-
428- desc = {'path' : '/~paulsm/' }
429- info = ServiceInfo (
430- type_ , registration_name , 80 , 0 , 0 , desc , "ash-2.local." , addresses = [socket .inet_aton ("10.0.1.2" )]
431- )
432-
433- registry = r .ServiceRegistry ()
434- registry .add (info )
435- self .assertRaises (r .ServiceNameAlreadyRegistered , registry .add , info )
436- registry .remove (info )
437- registry .add (info )
438-
439- def test_lookups (self ):
440- type_ = "_test-srvc-type._tcp.local."
441- name = "xxxyyy"
442- registration_name = "%s.%s" % (name , type_ )
443-
444- desc = {'path' : '/~paulsm/' }
445- info = ServiceInfo (
446- type_ , registration_name , 80 , 0 , 0 , desc , "ash-2.local." , addresses = [socket .inet_aton ("10.0.1.2" )]
447- )
448-
449- registry = r .ServiceRegistry ()
450- registry .add (info )
451-
452- assert registry .get_service_infos () == [info ]
453- assert registry .get_info_name (registration_name ) == info
454- assert registry .get_infos_type (type_ ) == [info ]
455- assert registry .get_infos_server ("ash-2.local." ) == [info ]
456- assert registry .get_types () == [type_ ]
457-
458-
459422def test_ptr_optimization ():
460423
461424 # instantiate a zeroconf instance
0 commit comments