~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/txlongpoll/tests/test_server.py

  • Committer: Raphael Badin
  • Date: 2011-09-27 09:25:31 UTC
  • mto: (14032.1.8 longpoll-uri-request)
  • mto: This revision was merged to the branch mainline in revision 14084.
  • Revision ID: raphael.badin@canonical.com-20110927092531-i97y5mcojubc6onn
Don't use RabbitServer in TxLongPollServer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
from ConfigParser import SafeConfigParser
9
9
from StringIO import StringIO
10
10
 
11
 
from canonical.testing.layers import BaseLayer
 
11
from canonical.config import config
 
12
from canonical.testing.layers import RabbitMQLayer
12
13
from lp.services.txlongpoll.server import TxLongPollServer
13
14
from lp.testing import TestCase
14
15
 
15
16
 
16
17
class TestTxLongPollServer(TestCase):
17
18
 
18
 
    layer = BaseLayer
 
19
    layer = RabbitMQLayer
19
20
 
20
21
    def test_service_config(self):
21
22
        # TxLongPollServer pokes some .ini configuration into its config.
34
35
        self.assertEqual(expected, observed)
35
36
        # rabbitmq section
36
37
        expected = {
37
 
            "host": "localhost:%d" % (
38
 
                fixture.rabbitserver.config.port),
 
38
            "host": "%s" % (
 
39
                config.rabbitmq.host),
39
40
            "password": "guest",
40
41
            "userid": "guest",
41
42
            "virtual_host": "/",
42
43
            }
43
44
        observed = dict(service_config.items("rabbitmq"))
44
45
        self.assertEqual(expected, observed)
45