Total Complexity | 6 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 70% |
1 | # -*- coding: utf-8 -*- |
||
5 | 10 | class SessionStorage(object): |
|
6 | |||
7 | 10 | def get(self, key, default=None): |
|
8 | raise NotImplementedError() |
||
9 | |||
10 | 10 | def set(self, key, value, ttl=None): |
|
11 | raise NotImplementedError() |
||
12 | |||
13 | 10 | def delete(self, key): |
|
14 | raise NotImplementedError() |
||
15 | |||
16 | 10 | def __getitem__(self, key): |
|
17 | self.get(key) |
||
18 | |||
19 | 10 | def __setitem__(self, key, value): |
|
20 | self.set(key, value) |
||
21 | |||
22 | 10 | def __delitem__(self, key): |
|
23 | self.delete(key) |
||
24 |