Browse Source

[2922] Cleaner way to extract lname from msgq

Michal 'vorner' Vaner 12 years ago
parent
commit
15810521bf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bin/msgq/tests/msgq_test.py

+ 2 - 2
src/bin/msgq/tests/msgq_test.py

@@ -280,7 +280,7 @@ class MsgQTest(unittest.TestCase):
 
         # We should notify about new cliend when we register it
         self.__msgq.register_socket(sock)
-        lname = list(self.__msgq.lnames.keys())[0] # Steal the lname
+        lname = self.__msgq.fd_to_lname[1] # Steal the lname
         self.assertEqual([('connected', {'client': lname})], notifications)
         notifications.clear()
 
@@ -313,7 +313,7 @@ class MsgQTest(unittest.TestCase):
 
         # Register and subscribe. Notifications for these are in above test.
         self.__msgq.register_socket(sock)
-        lname = list(self.__msgq.lnames.keys())[0] # Steal the lname
+        lname = self.__msgq.fd_to_lname[1] # Steal the lname
         self.__msgq.process_command_subscribe(sock, {'group': 'G',
                                                      'instance': '*'},
                                               None)