from pcswmm_ai import PCSWMMClient class FakeCollection(dict): @property def Count(self): return len(self) @property def Keys(self): return list(self.keys()) class FakeSWMM: ProjectName = "Test Project" ProjectFolder = r"C:\Test" FilePath = r"C:\Test\model.inp" Version = "SWMM5.2.3" RunStatus = "Ready" Scenarios = FakeCollection({"Base": object()}) Nodes = FakeCollection({"N1": object()}) Links = FakeCollection({"L1": object()}) Junctions = FakeCollection({}) Conduits = FakeCollection({}) Subcatchments = FakeCollection({"S1": object()}) Storages = FakeCollection({}) Outfalls = FakeCollection({}) def run(self): return None class FakeGraph: Files = [] class FakePCPY: SWMM = FakeSWMM() Graph = FakeGraph() def test_project_summary(): client = PCSWMMClient(FakePCPY()) summary = client.project.summary() assert summary["project_name"] == "Test Project" assert summary["node_count"] == 1