Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/redis/auth/err.py: 70%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

10 statements  

1from typing import Iterable 

2 

3 

4class RequestTokenErr(Exception): 

5 """ 

6 Represents an exception during token request. 

7 """ 

8 

9 def __init__(self, *args): 

10 super().__init__(*args) 

11 

12 

13class InvalidTokenSchemaErr(Exception): 

14 """ 

15 Represents an exception related to invalid token schema. 

16 """ 

17 

18 def __init__(self, missing_fields: Iterable[str] = []): 

19 super().__init__( 

20 "Unexpected token schema. Following fields are missing: " 

21 + ", ".join(missing_fields) 

22 ) 

23 

24 

25class TokenRenewalErr(Exception): 

26 """ 

27 Represents an exception during token renewal process. 

28 """ 

29 

30 def __init__(self, *args): 

31 super().__init__(*args)