MCPcopy Index your code
hub / github.com/endbasic/endbasic / add_mock_patch_file_content

Method add_mock_patch_file_content

client/src/testutils.rs:119–128  ·  view source on GitHub ↗
(
        &mut self,
        username: &str,
        filename: &str,
        exp_content: B,
        result: io::Result<()>,
    )

Source from the content-addressed store, hash-verified

117 /// `username`/`filename` pair with `exp_content` and that returns `result`.
118 #[cfg(test)]
119 pub(crate) fn add_mock_patch_file_content<B: Into<Vec<u8>>>(
120 &mut self,
121 username: &str,
122 filename: &str,
123 exp_content: B,
124 result: io::Result<()>,
125 ) {
126 let exp_request = (username.to_owned(), filename.to_owned(), exp_content.into());
127 self.mock_patch_file_content.push_back((exp_request, result));
128 }
129
130 /// Records the behavior of an upcoming "patch file ACLS" operation for the
131 /// `username`/`filename` pair with `exp_add` and `exp_remove` and that returns `result`.

Callers 2

test_clouddrive_put_newFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected