From 0899e716844530b2af5f29f33954b6c5280ba2ac Mon Sep 17 00:00:00 2001 From: lesion Date: Fri, 10 Jan 2025 18:33:49 +0100 Subject: [PATCH] AP locations fixtures --- .../bad-location-without-a-name.json | 4 +++ .../AP-location/multiple-mixed-locations.json | 30 +++++++++++++++++++ .../physical-location-no-address.json | 5 ++++ ...physical-location-with-postal-address.json | 13 ++++++++ ...l-location-with-simple-string-address.json | 6 ++++ .../physical-location-without-id.json | 4 +++ .../AP-location/virtual-location.json | 9 ++++++ 7 files changed, 71 insertions(+) create mode 100644 tests/fixtures/AP-location/bad-location-without-a-name.json create mode 100644 tests/fixtures/AP-location/multiple-mixed-locations.json create mode 100644 tests/fixtures/AP-location/physical-location-no-address.json create mode 100644 tests/fixtures/AP-location/physical-location-with-postal-address.json create mode 100644 tests/fixtures/AP-location/physical-location-with-simple-string-address.json create mode 100644 tests/fixtures/AP-location/physical-location-without-id.json create mode 100644 tests/fixtures/AP-location/virtual-location.json diff --git a/tests/fixtures/AP-location/bad-location-without-a-name.json b/tests/fixtures/AP-location/bad-location-without-a-name.json new file mode 100644 index 00000000..8db55551 --- /dev/null +++ b/tests/fixtures/AP-location/bad-location-without-a-name.json @@ -0,0 +1,4 @@ +{ + "id" : "http://localhost:13120/federation/p/1", + "type" : "Place" +} diff --git a/tests/fixtures/AP-location/multiple-mixed-locations.json b/tests/fixtures/AP-location/multiple-mixed-locations.json new file mode 100644 index 00000000..722aed21 --- /dev/null +++ b/tests/fixtures/AP-location/multiple-mixed-locations.json @@ -0,0 +1,30 @@ +[ + { + "id" : "http://localhost:13120/federation/p/4", + "name" : "Location with a name", + "type" : "Place" + }, + { + "id" : "http://localhost:13120/federation/p/5", + "name" : "A second location with a name", + "type" : "Place" + }, + { + "id" : "https://virtual.location.org", + "name" : "A Virtual location", + "address": { + "type": "VirtualLocation", + "url": "https://virtual.location.org" + }, + "type" : "Place" + }, + { + "id" : "https://a.second.fallback.virtual.location.org", + "name" : "A Fallback Virtual location", + "address": { + "type": "VirtualLocation", + "url": "https://a.second.fallback.virtual.location.org" + }, + "type" : "Place" + } +] diff --git a/tests/fixtures/AP-location/physical-location-no-address.json b/tests/fixtures/AP-location/physical-location-no-address.json new file mode 100644 index 00000000..74c731ba --- /dev/null +++ b/tests/fixtures/AP-location/physical-location-no-address.json @@ -0,0 +1,5 @@ +{ + "id" : "http://localhost:13120/federation/p/1", + "name" : "Location with a name", + "type" : "Place" +} diff --git a/tests/fixtures/AP-location/physical-location-with-postal-address.json b/tests/fixtures/AP-location/physical-location-with-postal-address.json new file mode 100644 index 00000000..8e41a452 --- /dev/null +++ b/tests/fixtures/AP-location/physical-location-with-postal-address.json @@ -0,0 +1,13 @@ +{ + "id" : "http://localhost:13120/federation/p/2", + "name" : "Location with a postal address", + "address": { + "type": "PostalAddress", + "addressCountry": "Austria", + "addressLocality": "Fediverse Town", + "addressRegion": "Steiermark", + "postalCode": "8010", + "streetAddress": "15 Fediverse Street" + }, + "type" : "Place" +} diff --git a/tests/fixtures/AP-location/physical-location-with-simple-string-address.json b/tests/fixtures/AP-location/physical-location-with-simple-string-address.json new file mode 100644 index 00000000..705fc5ed --- /dev/null +++ b/tests/fixtures/AP-location/physical-location-with-simple-string-address.json @@ -0,0 +1,6 @@ +{ + "id" : "http://localhost:13120/federation/p/3", + "name" : "Location with a simple string address", + "address": "Simple string address", + "type" : "Place" +} diff --git a/tests/fixtures/AP-location/physical-location-without-id.json b/tests/fixtures/AP-location/physical-location-without-id.json new file mode 100644 index 00000000..3af62463 --- /dev/null +++ b/tests/fixtures/AP-location/physical-location-without-id.json @@ -0,0 +1,4 @@ +{ + "name" : "Location without id", + "type" : "Place" +} diff --git a/tests/fixtures/AP-location/virtual-location.json b/tests/fixtures/AP-location/virtual-location.json new file mode 100644 index 00000000..c41e4e74 --- /dev/null +++ b/tests/fixtures/AP-location/virtual-location.json @@ -0,0 +1,9 @@ +{ + "id" : "https://virtual.location.org", + "name" : "A Virtual location", + "address": { + "type": "VirtualLocation", + "url": "https://virtual.location.org" + }, + "type" : "Place" +}