feat: add team-aware CRM queries and project tracking

This commit is contained in:
nac
2026-08-14 11:00:13 +00:00
parent 4b098eb4dd
commit 76e4cbf58a
13 changed files with 2761 additions and 263 deletions
+20
View File
@@ -297,6 +297,26 @@ class NbClientTests(unittest.TestCase):
with self.assertRaises(NbCommandError):
client.list_records("customers")
def test_json_output_parser_tolerates_one_surrounding_log_message(self) -> None:
def runner(cmd, **kwargs):
return subprocess.CompletedProcess(
cmd,
0,
stdout='startup log\n{"data":[{"id":1}],"meta":{"count":1}}\nfinished',
stderr="",
)
result = NbClient(env_name="nb-mcp", runner=runner).list_records("customers")
self.assertEqual(result["data"], [{"id": 1}])
def test_json_output_parser_rejects_multiple_top_level_objects(self) -> None:
def runner(cmd, **kwargs):
return subprocess.CompletedProcess(cmd, 0, stdout='{"log":1}\n{"data":[]}', stderr="")
with self.assertRaises(NbCommandError):
NbClient(env_name="nb-mcp", runner=runner).list_records("customers")
def test_environment_overrides_can_change_nb_home_without_shell(self) -> None:
captured_env = {}