def test_async_query(self): with tests.capture_stdout() as stdout: main( self.constants['projectId'], self.constants['query'], False, 5, 5) value = stdout.getvalue().strip().split('\n').pop() self.assertIsNotNone( json.loads(value))
def test_async_query_runner(self): test_project_id = os.environ.get(tests.PROJECT_ID_ENV) answers = [test_project_id, self.constants["query"], "n", "1", "1"] with tests.mock_raw_input(answers): main()