Change test pictures

The previous pictures were labeled as public domain, but are actually a collage of pictures under other licenses.

I now replaced them with a jpeg of simply a white pixel.
This commit is contained in:
Ilja 2022-05-21 09:37:20 +02:00
parent 7d234d097c
commit 4a9ed319b8
7 changed files with 21 additions and 29 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 KiB

View file

@ -7,26 +7,21 @@ defmodule Pleroma.Upload.Filter.Exiftool.ReadDescriptionTest do
alias Pleroma.Upload.Filter
@uploads %Pleroma.Upload{
name: "portrait_of_owls_imagedescription_and_caption-abstract.jpg",
name: "image_with_imagedescription_and_caption-abstract.jpg",
content_type: "image/jpeg",
path:
Path.absname("test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract.jpg"),
tempfile:
Path.absname("test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract_tmp.jpg"),
path: Path.absname("test/fixtures/image_with_imagedescription_and_caption-abstract.jpg"),
tempfile: Path.absname("test/fixtures/image_with_imagedescription_and_caption-abstract.jpg"),
description: nil
}
test "keeps description when not empty" do
uploads = %Pleroma.Upload{
name: "portrait_of_owls_imagedescription_and_caption-abstract.jpg",
name: "image_with_imagedescription_and_caption-abstract.jpg",
content_type: "image/jpeg",
path:
Path.absname("test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract.jpg"),
path: Path.absname("test/fixtures/image_with_imagedescription_and_caption-abstract.jpg"),
tempfile:
Path.absname(
"test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract_tmp.jpg"
),
description: "Eight different owls"
Path.absname("test/fixtures/image_with_imagedescription_and_caption-abstract.jpg"),
description: "Some description"
}
assert Filter.Exiftool.ReadDescription.filter(uploads) ==
@ -35,15 +30,12 @@ defmodule Pleroma.Upload.Filter.Exiftool.ReadDescriptionTest do
test "otherwise returns ImageDescription when present" do
uploads_after = %Pleroma.Upload{
name: "portrait_of_owls_imagedescription_and_caption-abstract.jpg",
name: "image_with_imagedescription_and_caption-abstract.jpg",
content_type: "image/jpeg",
path:
Path.absname("test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract.jpg"),
path: Path.absname("test/fixtures/image_with_imagedescription_and_caption-abstract.jpg"),
tempfile:
Path.absname(
"test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract_tmp.jpg"
),
description: "Pictures of eight different owls"
Path.absname("test/fixtures/image_with_imagedescription_and_caption-abstract.jpg"),
description: "a descriptive white pixel"
}
assert Filter.Exiftool.ReadDescription.filter(@uploads) ==
@ -52,19 +44,19 @@ defmodule Pleroma.Upload.Filter.Exiftool.ReadDescriptionTest do
test "otherwise returns iptc:Caption-Abstract when present" do
upload = %Pleroma.Upload{
name: "portrait_of_owls_caption-abstract.jpg",
name: "image_with_caption-abstract.jpg",
content_type: "image/jpeg",
path: Path.absname("test/fixtures/portrait_of_owls_caption-abstract.jpg"),
tempfile: Path.absname("test/fixtures/portrait_of_owls_caption-abstract_tmp.jpg"),
path: Path.absname("test/fixtures/image_with_caption-abstract.jpg"),
tempfile: Path.absname("test/fixtures/image_with_caption-abstract.jpg"),
description: nil
}
upload_after = %Pleroma.Upload{
name: "portrait_of_owls_caption-abstract.jpg",
name: "image_with_caption-abstract.jpg",
content_type: "image/jpeg",
path: Path.absname("test/fixtures/portrait_of_owls_caption-abstract.jpg"),
tempfile: Path.absname("test/fixtures/portrait_of_owls_caption-abstract_tmp.jpg"),
description: "Pictures of eight different owls - iptc"
path: Path.absname("test/fixtures/image_with_caption-abstract.jpg"),
tempfile: Path.absname("test/fixtures/image_with_caption-abstract.jpg"),
description: "an abstract white pixel"
}
assert Filter.Exiftool.ReadDescription.filter(upload) ==
@ -73,10 +65,10 @@ defmodule Pleroma.Upload.Filter.Exiftool.ReadDescriptionTest do
test "otherwise returns nil" do
uploads = %Pleroma.Upload{
name: "portrait_of_owls_no_description-abstract.jpg",
name: "image_with_no_description.jpg",
content_type: "image/jpeg",
path: Path.absname("test/fixtures/portrait_of_owls_no_description.jpg"),
tempfile: Path.absname("test/fixtures/portrait_of_owls_no_description_tmp.jpg"),
path: Path.absname("test/fixtures/image_with_no_description.jpg"),
tempfile: Path.absname("test/fixtures/image_with_no_description.jpg"),
description: nil
}