mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-28 00:02:12 +00:00
test: share the photo payload fixture, drop two test-only aliases
The one-photo MediaItemPayload literal was written out at six sites across the urls and send test modules; ctx::test_support::photo_item holds it once. permanent_error now delegates to api_error (it stays a fn pointer because that is what MockSender::scripted takes), misskey's x_media_site_id wrapper is gone in favour of the function it renamed, and PixivAPI is no longer re-exported -- nothing outside pixiv/api.rs names it.
This commit is contained in:
@@ -220,11 +220,7 @@ mod tests {
|
||||
cache_key("https://misskey.io/notes/aotihl10lqrs015s"),
|
||||
Some("misskey:aotihl10lqrs015s".to_string())
|
||||
);
|
||||
assert_eq!(x_media_site_id("misskey:abc"), "misskey");
|
||||
}
|
||||
|
||||
fn x_media_site_id(key: &str) -> &'static str {
|
||||
crate::site::site_id_from_key(key)
|
||||
assert_eq!(crate::site::site_id_from_key("misskey:abc"), "misskey");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -2,7 +2,7 @@ mod api;
|
||||
mod interface;
|
||||
mod model;
|
||||
|
||||
pub use api::{PixivAPI, PixivError, disable, fetch, validate};
|
||||
pub use api::{PixivError, disable, fetch, validate};
|
||||
pub use interface::{
|
||||
Illustration, PATTERN, PixivSite, cache_key, enabled, fetch_from_url, is_retryable,
|
||||
media_headers,
|
||||
|
||||
Reference in New Issue
Block a user