MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / test_service_layer

Method test_service_layer

tests/test_file_system.py:169–188  ·  view source on GitHub ↗

Test the service layer directly.

(self)

Source from the content-addressed store, hash-verified

167 self.assert_test("Successfully changed permissions" in result, result)
168
169 async def test_service_layer(self):
170 """Test the service layer directly."""
171 print("\n=== Testing Service Layer ===")
172
173 # Test service write/read
174 test_path = Path("service_test.txt")
175 await self.service.write_text(test_path, "Service test content")
176
177 request = FileReadRequest(path=test_path)
178 result = await self.service.read(request)
179 self.assert_test(result.content_text == "Service test content", result)
180
181 # Test service directory operations
182 await self.service.mkdir(Path("service_dir"))
183 files = await self.service.listdir(Path("."))
184 self.assert_test("service_dir" in files, result)
185
186 # Test service file stats
187 stat = await self.service.stat(test_path)
188 self.assert_test(stat.st_size > 0, result)
189
190 async def test_handlers(self):
191 """Test content handlers."""

Callers 1

run_all_testsMethod · 0.95

Calls 7

assert_testMethod · 0.95
FileReadRequestClass · 0.90
printFunction · 0.85
readMethod · 0.45
mkdirMethod · 0.45
listdirMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected