bbangert / beaker

WSGI middleware for sessions and caching
https://beaker.readthedocs.org/
Other
517 stars 147 forks source link

Use unittest.mock instead of separate mock #227

Closed jonathanspw closed 1 year ago

amol- commented 1 year ago

I think this is ok to merge, we have been officially discontinuing support for Python<3.7 and thus unittest.mock should be always available. There is still a lot of code to support older python versions around, but we have no requirement to guarantee that the tests can run there.

amol- commented 1 year ago

Ops, looks like this one actually broke the test suite.

I had thought that the tests had run on the PR but it seems they didn't.

    def test_dont_use_pylibmc_client(self):
        from beaker.ext.memcached import _load_client
>       load_mock = mock.Mock()
E       NameError: name 'mock' is not defined

Could you please open a follow-up PR to fix this?