def test_get_base_attributes_returns_only_intended_attributes(self): entity = Post() attrs = get_base_attributes(entity).keys() assert set(attrs) == { "created_at", "guid", "handle", "location", "provider_display_name", "public", "raw_content", "signature", } entity = Profile() attrs = get_base_attributes(entity).keys() assert set(attrs) == { "created_at", "guid", "handle", "name", "email", "gender", "raw_content", "location", "public", "nsfw", "public_key", "image_urls", "tag_list", "signature", }
def test_get_base_attributes_returns_only_intended_attributes(self): entity = Post() attrs = get_base_attributes(entity).keys() assert set(attrs) == { 'created_at', 'guid', 'handle', 'location', 'photos', 'provider_display_name', 'public', 'raw_content' }
def from_base(cls, entity): return cls(**get_base_attributes(entity))