~nova-coresec/nova/bexar-translations

« back to all changes in this revision

Viewing changes to nova/tests/test_rpc.py

  • Committer: Todd Willey
  • Date: 2011-01-04 05:23:35 UTC
  • mto: (515.6.1 newlog2)
  • mto: This revision was merged to the branch mainline in revision 528.
  • Revision ID: todd@ansolabs.com-20110104052335-rfq4igtasqjv3ux5
Apply logging changes as a giant patch to work around the cloudpipe delete + add issue in the original patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
Unit Tests for remote procedure calls using queue
20
20
"""
21
 
import logging
22
21
 
23
22
from nova import context
24
23
from nova import flags
 
24
from nova import logging
25
25
from nova import rpc
26
26
from nova import test
27
27
 
28
28
 
29
29
FLAGS = flags.FLAGS
 
30
LOG = logging.getLogger('nova.tests.rpc')
30
31
 
31
32
 
32
33
class RpcTestCase(test.TestCase):
115
116
    @staticmethod
116
117
    def echo(context, value):
117
118
        """Simply returns whatever value is sent in"""
118
 
        logging.debug("Received %s", value)
 
119
        LOG.debug(_("Received %s"), value)
119
120
        return value
120
121
 
121
122
    @staticmethod
122
123
    def context(context, value):
123
124
        """Returns dictionary version of context"""
124
 
        logging.debug("Received %s", context)
 
125
        LOG.debug(_("Received %s"), context)
125
126
        return context.to_dict()
126
127
 
127
128
    @staticmethod