MCPcopy Create free account
hub / github.com/MemTensor/MemOS / test_main_export_openapi

Method test_main_export_openapi

tests/test_cli.py:98–106  ·  view source on GitHub ↗

Test main function with export_openapi command.

(self, mock_export)

Source from the content-addressed store, hash-verified

96
97 @patch("memos.cli.export_openapi")
98 def test_main_export_openapi(self, mock_export):
99 """Test main function with export_openapi command."""
100 mock_export.return_value = True
101
102 with patch("sys.argv", ["memos", "export_openapi", "--output", "/test/openapi.json"]):
103 with pytest.raises(SystemExit) as exc_info:
104 main()
105 assert exc_info.value.code == 0
106 mock_export.assert_called_once_with("/test/openapi.json")

Callers

nothing calls this directly

Calls 2

mainFunction · 0.90
patchFunction · 0.85

Tested by

no test coverage detected