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