Esempio n. 1
0
    def publish_one(self, client, topic):
        t = PubSubTopic.find(topic)

        if t:
            logger.debug('publishing data once for %s to %s', topic, client)
            client.send(topic, t.payload(use_cache=True, name=topic))
Esempio n. 2
0
  def publish_one(self, client, topic):
    t = PubSubTopic.find(topic)

    if t:
      logger.debug('publishing data once for %s to %s', topic, client)
      client.send(topic, t.payload(useCache=True, name=topic))
 def test_not_exists(self):
   self.assertEqual(PubSubTopic.find("foobar"), None)
  def test_exists(self):
    topic = PubSubTopic("foo", None, None)

    self.assertEqual(PubSubTopic.find("foo"), topic)
    def test_exists(self):
        topic = PubSubTopic("foo", None, None)

        self.assertEqual(PubSubTopic.find("foo"), topic)
 def test_not_exists(self):
     self.assertEqual(PubSubTopic.find("foobar"), None)