Esempio n. 1
0
    def test_given_request_is(self):
        _ctx, _data = util.rand_string(2)

        def given_request_impl(ctx, data):
            self.assertEquals(ctx, _ctx)
            self.assertEquals(data, _data)

        with patch('zato.apitest.steps.common.given_request_impl', given_request_impl):
            common.given_request_is(_ctx, _data)
Esempio n. 2
0
    def test_given_request_is(self):
        _ctx, _data = util.rand_string(2)

        def given_request_impl(ctx, data):
            self.assertEquals(ctx, _ctx)
            self.assertEquals(data, _data)

        with patch('zato.apitest.steps.common.given_request_impl',
                   given_request_impl):
            common.given_request_is(_ctx, _data)
Esempio n. 3
0
 def setUp(self):
     self.ctx = Bunch()
     self.ctx.zato = util.new_context(None, util.rand_string(), {})
     self.format = common.given_format(self.ctx,'JSON')
     self.request = common.given_request_is(self.ctx, '{}')
Esempio n. 4
0
 def setUp(self):
     self.ctx = Bunch()
     self.ctx.zato = util.new_context(None, util.rand_string(), {})
     self.format = common.given_format(self.ctx, 'JSON')
     self.request = common.given_request_is(self.ctx, '{}')