Add url to Post, Image and Comment entities

merge-requests/132/head
Jason Robinson 2018-09-30 13:06:18 +03:00
rodzic 9f829cb044
commit 13ee55dfe8
2 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -13,6 +13,7 @@ class Image(PublicMixin, OptionalRawContentMixin, CreatedAtMixin):
linked_guid = ""
height = 0
width = 0
url = ""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@ -22,6 +23,7 @@ class Image(PublicMixin, OptionalRawContentMixin, CreatedAtMixin):
class Comment(RawContentMixin, ParticipationMixin, CreatedAtMixin):
"""Represents a comment, linked to another object."""
participation = "comment"
url = ""
_allowed_children = (Image,)
@ -40,6 +42,7 @@ class Follow(CreatedAtMixin, TargetIDMixin):
class Post(RawContentMixin, PublicMixin, CreatedAtMixin, ProviderDisplayNameMixin):
"""Reflects a post, status message, etc, which will be composed from the message or to the message."""
location = ""
url = ""
_allowed_children = (Image,)

Wyświetl plik

@ -17,6 +17,7 @@ class TestGetBaseAttributes:
assert set(attrs) == {
"created_at", "location", "provider_display_name", "public", "raw_content",
"signature", "base_url", "actor_id", "id", "handle", "guid", "activity", "activity_id",
"url",
}
entity = Profile()
attrs = get_base_attributes(entity).keys()