def test_task_check(ts): api = MyAPI() api._check('asdf') print(ts.mock_calls) assert ts.call_count == 1 ts.return_value.check_task.assert_called_once_with('asdf')
def test_index_page(): api = MyAPI() api._start = mock.Mock() api._check = mock.Mock() api.index() api._start.assert_called_once_with() api.index('asdf') api._check.assert_called_once_with('asdf')