REF/TST: mixed use of mock/monkeypatch
State: closed

doubt if this will work as don't have gbq configured locally.

will need to check output of CI.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Clean

Comments:
Is the goal here to get rid of the import? We are dropping Py27 for 0.25 onwards so may be able to remove organically.

I suppose by using a lambda we are making more assumptions about the `pandas_gbq` codebase and how they treat their functions. May or may not make a difference but I'd lean towards just waiting to drop Py27 as part of cleanup
@WillAyd we could drop the import in this module by using the mock fixture from conftest.py.

this was to see if we need mock at all and could just use monkeypatch instead of both mock and monkeypatch.

i expect this PR to fail on the parameters, i'll either change the number of inputs or change the lambda to a function with *args and **kwargs.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=h1) Report
> Merging [#24557](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/aa7cb0138da6e20b356e8d9ae1f184e78a04189f?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24557/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24557   +/-   ##
=======================================
  Coverage   92.33%   92.33%           
=======================================
  Files         166      166           
  Lines       52465    52465           
=======================================
  Hits        48442    48442           
  Misses       4023     4023
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.75% <ø> (ø)` | :arrow_up: |
| #single | `43% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=footer). Last update [aa7cb01...ab496f8](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=h1) Report
> Merging [#24557](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/19f715c51d16995fc6cd0c102fdba2f213a83a0f?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24557/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24557   +/-   ##
=======================================
  Coverage   92.37%   92.37%           
=======================================
  Files         166      166           
  Lines       52396    52396           
=======================================
  Hits        48403    48403           
  Misses       3993     3993
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.8% <ø> (ø)` | :arrow_up: |
| #single | `43% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=footer). Last update [19f715c...72a6c0b](https://codecov.io/gh/pandas-dev/pandas/pull/24557?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

we also have a mock fixture in pandas/conftest.py should remove that too
lgtm @jreback 
thanks!