Exemple #1
0
class MethodMessageFactoryTestCase(unittest.TestCase):
    def setUp(self):
        self.factory = MethodMessageFactory(build_id_generator())

    def test_build(self):
        ids = set()
        for i in xrange(0, 100):
            message = self.factory.build('method', ['params'])
            self.assertIsInstance(message, MethodMessage)
            self.assertNotIn(message.id, ids)
            ids.add(message.id)
Exemple #2
0
 def setUp(self):
     self.factory = MethodMessageFactory(build_id_generator())