Пример #1
0
 def tearDown(self):
     channelsNames = channels._cache.keys()
     classesNames = channels._registry.keys()
     for channelName in channelsNames:
         if channelName not in self.existingChannels:
             channels.remove(channelName)
     for className in classesNames:
         if className not in self.registeredClasses:
             del channels._registry[className]
     for channelName in self.configChannels:
         settings.remove(channels.CONFIG_NAME, channelName)
Пример #2
0
 def tearDown(self):
     channelsNames = channels._cache.keys()
     classesNames = channels._registry.keys()
     for channelName in channelsNames:
         if channelName not in self.existingChannels:
             channels.remove(channelName)
     for className in classesNames:
         if className not in self.registeredClasses:
             del channels._registry[className]
     for channelName in self.configChannels:
         settings.remove(channels.CONFIG_NAME, channelName)
Пример #3
0
 def testRemove(self):
     channel = TestClass1("Test")
     channels._cache[channel.name] = channel
     self.assertEqual(None, channels.remove("TestName"))
     self.assertEqual(channel, channels.remove("Test"))
     self.assertFalse(channel.name in channels._cache)
Пример #4
0
 def testRemove(self):
     channel = TestClass1("Test")
     channels._cache[channel.name] = channel
     self.assertEqual(None, channels.remove("TestName"))
     self.assertEqual(channel, channels.remove("Test"))
     self.assertFalse(channel.name in channels._cache)