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

Method create_mock_zip_content

tests/test_cli.py:46–54  ·  view source on GitHub ↗

Create mock zip file content for testing.

(self)

Source from the content-addressed store, hash-verified

44 """Test the download_examples function."""
45
46 def create_mock_zip_content(self):
47 """Create mock zip file content for testing."""
48 zip_buffer = BytesIO()
49 with zipfile.ZipFile(zip_buffer, "w") as zip_file:
50 zip_file.writestr("MemOS-main/examples/test_example.py", "# Test example content")
51 zip_file.writestr(
52 "MemOS-main/examples/subfolder/another_example.py", "# Another example"
53 )
54 return zip_buffer.getvalue()
55
56 @patch("requests.get")
57 @patch("os.makedirs")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected