You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
541 B
16 lines
541 B
from imwald.core.nostr_nip96_upload import nip94_tags_to_imeta |
|
|
|
|
|
def test_nip94_tags_to_imeta_shape() -> None: |
|
tags = [ |
|
["url", "https://media.nostr.build/example.png"], |
|
["m", "image/png"], |
|
["dim", "512x512"], |
|
["alt", "Forest pattern"], |
|
["ox", "a" * 64], |
|
] |
|
im = nip94_tags_to_imeta(tags) |
|
assert im[0] == "imeta" |
|
assert "url https://media.nostr.build/example.png" in im |
|
assert any(x.startswith("m image/png") for x in im) |
|
assert any(x.startswith("dim 512x512") for x in im)
|
|
|