feat: add team-aware CRM queries and project tracking
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user