schireson / pytest-mock-resources

Pytest Fixtures that let you actually test against external resource (Postgres, Mongo, Redshift...) dependent code.
https://pytest-mock-resources.readthedocs.io/en/latest/quickstart.html
MIT License
179 stars 19 forks source link

Add Redis the CLI #143

Closed michaelbukachi closed 2 years ago

michaelbukachi commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, it's possible to run Redis using the CLI i.e pmr redis. I get the following error:

Traceback (most recent call last):
  File "/home/michael/.cache/pypoetry/virtualenvs/app-d-AWDS2Y-py3.9/bin/pmr", line 8, in <module>
    sys.exit(main())
  File "/home/michael/.cache/pypoetry/virtualenvs/app-d-AWDS2Y-py3.9/lib/python3.9/site-packages/pytest_mock_resources/cli.py", line 79, in main
    command = FixtureBase(fixture_base).command
  File "/usr/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 'redis' is not a valid FixtureBase

Describe the solution you'd like It would be nice if we could support Redis as well.

I can open up a PR for this.

DanCardin commented 2 years ago

I agree. There's no reason this CLI tool shouldn't support all the supported container types. Looking at the CLI impl though, i'd rather not just keep adding to the mess. I'll try to prototype some updates that make it less onerous to keep updating

DanCardin commented 2 years ago

Released in 2.2.5 just now btw

michaelbukachi commented 2 years ago

@DanCardin Awesome 🔥