Comments (8)
Are there more commands like that or only this one?
from fakeredis-py.
Not sure how you got it to work with real redis - The method signature is:
def srem(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:
so running the command you propose does not work on redis-py and therefore does not work on FakeRedis
from fakeredis-py.
No you have to send string by string, my mistake, I have a unit test now that works on my side for my case. Ill update my sample.
We only met srem as an issue, havent dug hard into the other commands.
from fakeredis-py.
please send the test that does not work
from fakeredis-py.
def test_fail():
from fakeredis import FakeRedis
r = FakeRedis()
r.srem(name='somekey', values='one')
from fakeredis-py.
Did you try it with real redis-py
?
It fails on real redis-py
as well with the same error...
from fakeredis-py.
I located the source of the bug on my side, its most likely in my venv I was using not the libraries or some editor cache in the venv....
Sorry to bug everyone, for some reason it showed different signatures when using the classes directly and that crashed in my unit tests when I used this. I recreated a clean venv with only the usecase and the two libs redis and fakeredis and now the signatures are similar and it works as expected. I will try find what is messing up my environment without bugging you guys :)
from fakeredis-py.
No problem @klausmyrseth. Happy to help.
from fakeredis-py.
Related Issues (20)
- Implement support for `TOPK.RESERVE` (topk command) HOT 9
- Implement support for `TOPK.ADD` (topk command) HOT 1
- Implement support for `TOPK.INCRBY` (topk command)
- Implement support for `TOPK.QUERY` (topk command)
- Implement support for `TOPK.COUNT` (topk command)
- Implement support for `TOPK.LIST` (topk command)
- Implement support for `TOPK.INFO` (topk command)
- Using a blocking XREAD on an empty stream returns a list instead of blocking HOT 1
- EXAT option does not work HOT 1
- The documentation for adding `FakeRedis` as a cache backend in Django is outdated.
- Add support for specifying specific Lua runtime version HOT 12
- Support for floating point timeout values HOT 1
- FastAPI integration Async Redis session dependency override, error during test RuntimeError: <Queue > is bound to a different event loop HOT 18
- FakeAsyncRedis stores state when clear instance expected. HOT 4
- xinfo_stream returns data for a stream that doesn't exist HOT 1
- Data persistence for sync and async clients is surprisingly different
- `FakeRedis.smembers()` reads data added to other instances (in version 2.21.2) HOT 4
- Persistence between across pytest cases difference between 2.21.1 and 2.21.2 HOT 10
- Type hint for version doesn't permit what the docs say to do HOT 3
- Add better support for LUA scripts HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fakeredis-py.