예제 #1
0
 def test_when_not_cached(self):
     chan = Mock()
     chan.connection.client.declared_entities = ['bar']
     assert not declaration_cached('foo', chan)
예제 #2
0
 def test_when_not_cached(self):
     chan = Mock()
     chan.connection.client.declared_entities = ['bar']
     self.assertFalse(declaration_cached('foo', chan))
예제 #3
0
파일: test_common.py 프로젝트: romand/kombu
 def test_when_cached(self):
     chan = Mock()
     chan.connection.client.declared_entities = ['foo']
     self.assertTrue(declaration_cached('foo', chan))
예제 #4
0
 def declare(self):
     if self.exchange.name and \
             not declaration_cached(self.exchange, self.channel):
         super(TaskPublisher, self).declare()
예제 #5
0
파일: test_common.py 프로젝트: celery/kombu
 def test_when_cached(self):
     chan = Mock()
     chan.connection.client.declared_entities = ['foo']
     assert declaration_cached('foo', chan)
예제 #6
0
 def test_when_cached(self):
     chan = Mock()
     chan.connection.client.declared_entities = ["foo"]
     self.assertTrue(declaration_cached("foo", chan))