@@ -11,18 +11,6 @@ def test_serialize(self):
11
11
'{"hello": {"foo": "bar"}}' ,
12
12
)
13
13
14
- def test_serialize_force_str (self ):
15
- class Foo :
16
- spam = "bar"
17
-
18
- def __str__ (self ):
19
- return f"Foo spam={ self .spam } "
20
-
21
- self .assertEqual (
22
- store .serialize ({"hello" : Foo ()}),
23
- '{"hello": "Foo spam=bar"}' ,
24
- )
25
-
26
14
def test_deserialize (self ):
27
15
self .assertEqual (
28
16
store .deserialize ('{"hello": {"foo": "bar"}}' ),
@@ -38,7 +26,7 @@ def test_methods_are_not_implemented(self):
38
26
]
39
27
self .assertEqual (len (methods ), 7 )
40
28
with self .assertRaises (NotImplementedError ):
41
- store .BaseStore .ids ()
29
+ store .BaseStore .request_ids ()
42
30
with self .assertRaises (NotImplementedError ):
43
31
store .BaseStore .exists ("" )
44
32
with self .assertRaises (NotImplementedError ):
@@ -64,7 +52,7 @@ def tearDown(self) -> None:
64
52
def test_ids (self ):
65
53
self .store .set ("foo" )
66
54
self .store .set ("bar" )
67
- self .assertEqual (list (self .store .ids ()), ["foo" , "bar" ])
55
+ self .assertEqual (list (self .store .request_ids ()), ["foo" , "bar" ])
68
56
69
57
def test_exists (self ):
70
58
self .assertFalse (self .store .exists ("missing" ))
@@ -73,14 +61,14 @@ def test_exists(self):
73
61
74
62
def test_set (self ):
75
63
self .store .set ("foo" )
76
- self .assertEqual (list (self .store .ids ()), ["foo" ])
64
+ self .assertEqual (list (self .store .request_ids ()), ["foo" ])
77
65
78
66
def test_set_max_size (self ):
79
67
existing = self .store ._config ["RESULTS_CACHE_SIZE" ]
80
68
self .store ._config ["RESULTS_CACHE_SIZE" ] = 1
81
69
self .store .save_panel ("foo" , "foo.panel" , "foo.value" )
82
70
self .store .save_panel ("bar" , "bar.panel" , {"a" : 1 })
83
- self .assertEqual (list (self .store .ids ()), ["bar" ])
71
+ self .assertEqual (list (self .store .request_ids ()), ["bar" ])
84
72
self .assertEqual (self .store .panel ("foo" , "foo.panel" ), {})
85
73
self .assertEqual (self .store .panel ("bar" , "bar.panel" ), {"a" : 1 })
86
74
# Restore the existing config setting since this config is shared.
@@ -89,20 +77,20 @@ def test_set_max_size(self):
89
77
def test_clear (self ):
90
78
self .store .save_panel ("bar" , "bar.panel" , {"a" : 1 })
91
79
self .store .clear ()
92
- self .assertEqual (list (self .store .ids ()), [])
80
+ self .assertEqual (list (self .store .request_ids ()), [])
93
81
self .assertEqual (self .store .panel ("bar" , "bar.panel" ), {})
94
82
95
83
def test_delete (self ):
96
84
self .store .save_panel ("bar" , "bar.panel" , {"a" : 1 })
97
85
self .store .delete ("bar" )
98
- self .assertEqual (list (self .store .ids ()), [])
86
+ self .assertEqual (list (self .store .request_ids ()), [])
99
87
self .assertEqual (self .store .panel ("bar" , "bar.panel" ), {})
100
88
# Make sure it doesn't error
101
89
self .store .delete ("bar" )
102
90
103
91
def test_save_panel (self ):
104
92
self .store .save_panel ("bar" , "bar.panel" , {"a" : 1 })
105
- self .assertEqual (list (self .store .ids ()), ["bar" ])
93
+ self .assertEqual (list (self .store .request_ids ()), ["bar" ])
106
94
self .assertEqual (self .store .panel ("bar" , "bar.panel" ), {"a" : 1 })
107
95
108
96
def test_panel (self ):
0 commit comments