Exemplo n.º 1
0
class AppTest(base.TestCase):
    def setUp(self):
        super(AppTest, self).setUp()
        self.log_manager = LogManager('', '')
        mock_send = mock.Mock()
        Manager.send_get = Manager.send_post = mock_send

    def test_get(self):
        self.log_manager.get('a', '1', 1, 'ASC')
        body = dict(page='1', page_size='1', sort_mode='ASC')
        spec_url = '/a'
        Manager.send_post.assert_called_with(body, spec_url)
class AppTest(base.TestCase):
    def setUp(self):
        super(AppTest, self).setUp()
        self.log_manager = LogManager('', '')
        mock_send = mock.Mock()
        Manager.send_get = Manager.send_post = mock_send

    def test_get(self):
        self.log_manager.get('a', '1', 1, 'ASC')
        body = dict(page='1',
                    page_size='1',
                    sort_mode='ASC')
        spec_url = '/a'
        Manager.send_post.assert_called_with(body, spec_url)
Exemplo n.º 3
0
 def setUp(self):
     super(AppTest, self).setUp()
     self.log_manager = LogManager('', '')
     mock_send = mock.Mock()
     Manager.send_get = Manager.send_post = mock_send
 def setUp(self):
     super(AppTest, self).setUp()
     self.log_manager = LogManager('', '')
     mock_send = mock.Mock()
     Manager.send_get = Manager.send_post = mock_send