add test_util stubs for file open and append_line
This commit is contained in:
parent
fede0eebf1
commit
d5b54a75d3
1 changed files with 7 additions and 0 deletions
|
@ -8,6 +8,7 @@ use tempfile::{tempdir, TempDir};
|
|||
|
||||
use crate::{
|
||||
errors::Error,
|
||||
file::{FileAppendLineFn, FileOpenFn},
|
||||
network::{NetworkDownloadAsMp3Fn, NetworkFetchAsBytesFn, NetworkFetchAsTextFn},
|
||||
prelude::*,
|
||||
};
|
||||
|
@ -45,3 +46,9 @@ pub fn stub_fetch_as_bytes() -> NetworkFetchAsBytesFn {
|
|||
pub fn stub_download_as_mp3() -> NetworkDownloadAsMp3Fn {
|
||||
Box::new(|_url: &str| Err(Error::message("Not implemented")))
|
||||
}
|
||||
pub fn stub_file_open() -> FileOpenFn {
|
||||
Box::new(|_path: &str| Err(Error::message("Not implemented")))
|
||||
}
|
||||
pub fn stub_file_append_line() -> FileAppendLineFn {
|
||||
Box::new(|_: &str, _: &str| Err(Error::message("Not implemented")))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue