Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)