How to use the fakeredis._server.AfterAny function in fakeredis

To help you get started, we’ve selected a few fakeredis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jamesls / fakeredis / fakeredis / _server.py View on Github external
def upper_bound(self):
        return (self.value, BeforeAny() if self.exclusive else AfterAny())
github jamesls / fakeredis / fakeredis / _server.py View on Github external
def lower_bound(self):
        return (self.value, AfterAny() if self.exclusive else BeforeAny())
github jamesls / fakeredis / fakeredis / _server.py View on Github external
def decode(cls, value):
        if value == b'-':
            return cls(BeforeAny(), True)
        elif value == b'+':
            return cls(AfterAny(), True)
        elif value[:1] == b'(':
            return cls(value[1:], True)
        elif value[:1] == b'[':
            return cls(value[1:], False)
        else:
            raise redis.ResponseError(INVALID_MIN_MAX_STR_MSG)
github jamesls / fakeredis / fakeredis / _server.py View on Github external
def __eq__(self, other):
        return isinstance(other, AfterAny)