@@ -28,7 +28,6 @@ def test_metadata_roundtrip(self):
2828 store = SessionPersistence (
2929 project_dir = "/tmp/proj" ,
3030 model = "deepseek-v4" ,
31- backend = "DeepSeek" ,
3231 system_prompt = "be helpful" ,
3332 temperature = 0.7 ,
3433 max_tokens = 8192 ,
@@ -47,7 +46,6 @@ def test_round_times_persisted_in_metadata(self):
4746 store = SessionPersistence (
4847 project_dir = "/tmp/proj" ,
4948 model = "deepseek-v4" ,
50- backend = "DeepSeek" ,
5149 round_times = [1700000000.0 , 1700000100.5 ],
5250 )
5351 meta = store .metadata_block ()
@@ -59,7 +57,7 @@ def test_round_times_persisted_in_metadata(self):
5957 self .assertEqual (times , [1700000000.0 , 1700000100.5 ])
6058
6159 def test_round_times_absent_when_empty (self ):
62- store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
60+ store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
6361 self .assertNotIn ("round-times" , store .metadata_block ())
6462
6563 def test_save_and_restore_flow (self ):
@@ -70,7 +68,6 @@ def test_save_and_restore_flow(self):
7068 store = SessionPersistence (
7169 project_dir = d ,
7270 model = "m" ,
73- backend = "b" ,
7471 )
7572 path = store .save ("hello world" )
7673 self .assertTrue (path )
@@ -88,7 +85,7 @@ def test_apply_title_renames(self):
8885 old_dir = config .SESSION_DIR
8986 config .SESSION_DIR = __import__ ("pathlib" ).Path (d )
9087 try :
91- store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
88+ store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
9289 store .save ("x" )
9390 store .apply_title ("My Great Session" )
9491 self .assertTrue (os .path .exists (store .file_path ))
@@ -110,9 +107,9 @@ def test_same_second_save_collision_keeps_both(self):
110107 old_dir = config .SESSION_DIR
111108 config .SESSION_DIR = __import__ ("pathlib" ).Path (d )
112109 try :
113- s1 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
110+ s1 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
114111 p1 = s1 .save ("one" )
115- s2 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
112+ s2 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
116113 p2 = s2 .save ("two" )
117114 self .assertNotEqual (p1 , p2 )
118115 self .assertTrue (os .path .exists (p1 ))
@@ -136,11 +133,11 @@ def test_title_collision_keeps_both_files(self):
136133 old_dir = config .SESSION_DIR
137134 config .SESSION_DIR = __import__ ("pathlib" ).Path (d )
138135 try :
139- s1 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
136+ s1 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
140137 s1 .save ("one" )
141138 s1 .apply_title ("Same Title" )
142139 t1 = s1 .file_path
143- s2 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
140+ s2 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
144141 s2 .save ("two" )
145142 s2 .apply_title ("Same Title" )
146143 t2 = s2 .file_path
@@ -155,14 +152,14 @@ def test_save_returns_none_without_file_path(self):
155152 must return None instead of writing anywhere."""
156153 import unittest .mock as mock
157154
158- store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
155+ store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
159156 with mock .patch .object (SessionPersistence , "session_file" , return_value = None ):
160157 self .assertIsNone (store .save ("hello" ))
161158
162159 def test_apply_title_requires_nonempty_sanitized_title (self ):
163160 """A title that sanitizes to '' must not rename anything and must
164161 not be recorded."""
165- store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
162+ store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
166163 store .apply_title (" --- " ) # sanitizes to ""
167164 self .assertIsNone (store .title )
168165 self .assertIsNone (store .file_path )
@@ -180,7 +177,7 @@ def test_apply_title_oserror_keeps_original_file(self):
180177 old_dir = config .SESSION_DIR
181178 config .SESSION_DIR = __import__ ("pathlib" ).Path (d )
182179 try :
183- store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
180+ store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
184181 store .save ("x" )
185182 before = store .file_path
186183 with mock .patch (
@@ -211,7 +208,7 @@ def test_concurrent_save_and_apply_title_do_not_split(self):
211208 old_dir = config .SESSION_DIR
212209 config .SESSION_DIR = __import__ ("pathlib" ).Path (d )
213210 try :
214- store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
211+ store = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
215212 store .save ("old content" )
216213 before = store .file_path
217214
@@ -298,9 +295,9 @@ def test_list_sessions_newest_first(self):
298295 old_dir = config .SESSION_DIR
299296 config .SESSION_DIR = Path (d )
300297 try :
301- s1 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
298+ s1 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
302299 p1 = s1 .save ("one" )
303- s2 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" , backend = "b" )
300+ s2 = SessionPersistence (project_dir = "/tmp/proj" , model = "m" )
304301 p2 = s2 .save ("two" )
305302 os .utime (p1 , (1_000_000 , 1_000_000 )) # make p1 the older file
306303 sessions = SessionPersistence .list_sessions ()
0 commit comments