Exemplo n.º 1
0
    def setUp(self):
        self.maxDiff = None
        self._querier = LogQuerier()

        flexmock(OpServerUtils).should_receive('post_url_http').replace_with(lambda x, y, w, z: self.custom_post_url_http(x, y))
        self.query_expectations = flexmock(OpServerUtils).should_receive('get_query_result').replace_with(lambda x, y, z, a, b: self.custom_get_query_result(x, y, z))
        self.display_expectations = flexmock(LogQuerier).should_receive('display').replace_with(lambda x: self.custom_display(x))
        self.process_start_expectations = flexmock(Process).should_receive('start').replace_with(lambda:self.custom_process_start())
        self.process_end_expectations = flexmock(Process).should_receive('join').replace_with(lambda:self.custom_process_end())
Exemplo n.º 2
0
    def setUp(self):
        self.maxDiff = None
        self._querier = LogQuerier()

        flexmock(OpServerUtils).should_receive('post_url_http').replace_with(
            lambda x, y: self.custom_post_url_http(x, y))
        flexmock(OpServerUtils).should_receive(
            'get_query_result').replace_with(
                lambda x, y, z: self.custom_get_query_result(x, y, z))
        flexmock(self._querier).should_receive('display').replace_with(
            lambda x: self.custom_display(x))