Test the service layer directly.
(self)
| 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.""" |
no test coverage detected