From a75867b80aaabd72f310c73b33380076543eee27 Mon Sep 17 00:00:00 2001 From: Alexey <1337kwiz@gmail.com> Date: Mon, 10 Jun 2024 00:14:51 +0300 Subject: [PATCH] Refactor tests, make link and enclosure a list fixes #49 --- pyproject.toml | 58 +- rss_parser/models/__init__.py | 2 - rss_parser/models/rss/channel.py | 1 - rss_parser/models/rss/item.py | 11 +- tests/__init__.py | 0 tests/conftest.py | 15 +- tests/samples/apology_line.json | 144 -- .../data.xml} | 2 + tests/samples/apology_line/result.pkl | Bin 0 -> 5639 bytes tests/samples/apology_line_plain.json | 57 - tests/samples/atom.json | 149 -- tests/samples/{atom.xml => atom/data.xml} | 0 tests/samples/atom/result.pkl | Bin 0 -> 1510 bytes tests/samples/atom_plain.json | 51 - tests/samples/custom.xml | 4 - tests/samples/generic_atom_feed.json | 252 -- .../data.xml} | 0 tests/samples/generic_atom_feed/result.pkl | Bin 0 -> 4019 bytes tests/samples/generic_atom_feed_plain.json | 103 - tests/samples/github-49/data.xml | 2109 +++++++++++++++++ tests/samples/github-49/result.pkl | Bin 0 -> 26858 bytes tests/samples/rss_2.json | 413 ---- tests/samples/{rss_2.xml => rss_2/data.xml} | 0 tests/samples/rss_2/result.pkl | Bin 0 -> 7338 bytes tests/samples/rss_2_no_category_attr.json | 409 ---- .../data.xml} | 0 .../samples/rss_2_no_category_attr/result.pkl | Bin 0 -> 7288 bytes .../samples/rss_2_no_category_attr_plain.json | 141 -- tests/samples/rss_2_plain.json | 141 -- tests/samples/rss_2_with_1_item.json | 133 -- .../data.xml} | 0 tests/samples/rss_2_with_1_item/result.pkl | Bin 0 -> 1897 bytes tests/test_parsing.py | 129 +- 33 files changed, 2205 insertions(+), 2119 deletions(-) create mode 100644 tests/__init__.py delete mode 100644 tests/samples/apology_line.json rename tests/samples/{apology_line.xml => apology_line/data.xml} (98%) create mode 100644 tests/samples/apology_line/result.pkl delete mode 100644 tests/samples/apology_line_plain.json delete mode 100644 tests/samples/atom.json rename tests/samples/{atom.xml => atom/data.xml} (100%) create mode 100644 tests/samples/atom/result.pkl delete mode 100644 tests/samples/atom_plain.json delete mode 100644 tests/samples/custom.xml delete mode 100644 tests/samples/generic_atom_feed.json rename tests/samples/{generic_atom_feed.xml => generic_atom_feed/data.xml} (100%) create mode 100644 tests/samples/generic_atom_feed/result.pkl delete mode 100644 tests/samples/generic_atom_feed_plain.json create mode 100644 tests/samples/github-49/data.xml create mode 100644 tests/samples/github-49/result.pkl delete mode 100644 tests/samples/rss_2.json rename tests/samples/{rss_2.xml => rss_2/data.xml} (100%) create mode 100644 tests/samples/rss_2/result.pkl delete mode 100644 tests/samples/rss_2_no_category_attr.json rename tests/samples/{rss_2_no_category_attr.xml => rss_2_no_category_attr/data.xml} (100%) create mode 100644 tests/samples/rss_2_no_category_attr/result.pkl delete mode 100644 tests/samples/rss_2_no_category_attr_plain.json delete mode 100644 tests/samples/rss_2_plain.json delete mode 100644 tests/samples/rss_2_with_1_item.json rename tests/samples/{rss_2_with_1_item.xml => rss_2_with_1_item/data.xml} (100%) create mode 100644 tests/samples/rss_2_with_1_item/result.pkl diff --git a/pyproject.toml b/pyproject.toml index cd13636..9a2f292 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,10 +29,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -packages = [ - {include = "rss_parser"}, - {include = "rss_parser/py.typed"}, -] +packages = [{ include = "rss_parser" }, { include = "rss_parser/py.typed" }] [tool.poetry.urls] @@ -54,7 +51,11 @@ rich = "*" pytest = "^7.4.0" [tool.pytest.ini_options] -addopts = "-color=yes" +addopts = "--color=yes" +testpaths = ["tests"] +log_cli = true +log_level = "INFO" + [tool.black] line-length = 120 @@ -65,36 +66,33 @@ line-length = 120 target-version = "py38" respect-gitignore = true select = [ - "PL", # pylint - "F", # pyflakes - "E", # pycodestyle errors - "W", # pycodestyle warnings - "I", # isort - "N", # pep8-naming - "S", # flake8-bandit - "A", # flake8-builtins - "C40", # flake8-comprehensions - "T10", # flake8-debugger - "EXE", # flake8-executable - "T20", # flake8-print - "TID", # flake8-tidy-imports - "TCH", # flake8-type-checking - "ARG", # flake8-unused-arguments - "RUF", # ruff + "PL", # pylint + "F", # pyflakes + "E", # pycodestyle errors + "W", # pycodestyle warnings + "I", # isort + "N", # pep8-naming + "S", # flake8-bandit + "A", # flake8-builtins + "C40", # flake8-comprehensions + "T10", # flake8-debugger + "EXE", # flake8-executable + "T20", # flake8-print + "TID", # flake8-tidy-imports + "TCH", # flake8-type-checking + "ARG", # flake8-unused-arguments + "RUF", # ruff ] [tool.ruff.per-file-ignores] "tests/**.py" = [ - "S101", # Use of assert detected - "ARG001", # Unused function argument - "S311", # Allow use of random -] -"**/__init__.py" = [ - "F401" -] -"rss_parser/models/atom/**" = [ - "A003" + "S101", # Use of assert detected + "ARG001", # Unused function argument + "S311", # Allow use of random + "S301", # Allow use of pickle ] +"**/__init__.py" = ["F401"] +"rss_parser/models/atom/**" = ["A003"] [build-system] diff --git a/rss_parser/models/__init__.py b/rss_parser/models/__init__.py index d7a5cfa..2de4b66 100644 --- a/rss_parser/models/__init__.py +++ b/rss_parser/models/__init__.py @@ -13,8 +13,6 @@ class XMLBaseModel(pydantic.BaseModel): class Config: - # Not really sure if we want for the schema obj to be immutable, disabling for now - # allow_mutation = False alias_generator = camel_case def json_plain(self, **kw): diff --git a/rss_parser/models/rss/channel.py b/rss_parser/models/rss/channel.py index d7fa336..6cd1329 100644 --- a/rss_parser/models/rss/channel.py +++ b/rss_parser/models/rss/channel.py @@ -36,7 +36,6 @@ class OptionalChannelElementsMixin(XMLBaseModel): copyright: Optional[Tag[str]] = None # Copyright 2002, Spartanburg Herald-Journal # noqa "Copyright notice for content in the channel." - managing_editor: Optional[Tag[str]] = None # geo@herald.com (George Matesky) "Email address for person responsible for editorial content." web_master: Optional[Tag[str]] = None # betty@herald.com (Betty Guernsey) diff --git a/rss_parser/models/rss/item.py b/rss_parser/models/rss/item.py index 72fbdbd..17da5f2 100644 --- a/rss_parser/models/rss/item.py +++ b/rss_parser/models/rss/item.py @@ -1,14 +1,18 @@ from typing import Optional from rss_parser.models import XMLBaseModel +from rss_parser.models.types.only_list import OnlyList from rss_parser.models.types.tag import Tag +from rss_parser.pydantic_proxy import import_v1_pydantic + +pydantic = import_v1_pydantic() class RequiredItemElementsMixin(XMLBaseModel): title: Tag[str] = None # Venice Film Festival Tries to Quit Sinking "The title of the item." - link: Tag[str] = None # http://nytimes.com/2004/12/07FEST.html + links: OnlyList[Tag[str]] = pydantic.Field(alias="link") # http://nytimes.com/2004/12/07FEST.html "The URL of the item." description: Tag[ @@ -28,8 +32,9 @@ class OptionalItemElementsMixin(XMLBaseModel): comments: Optional[Tag[str]] = None "URL of a page for comments relating to the item." - enclosure: Optional[Tag[str]] = None - "Describes a media object that is attached to the item." + enclosures: Optional[OnlyList[Tag[str]]] = pydantic.Field(alias="enclosure", default=[]) + # enclosure: Optional[OnlyList[Tag[str]]] = None + "Describes a media object that is attached to the item.\n" "Can be a list -> https://validator.w3.org/feed/docs/warning/DuplicateEnclosure.html" guid: Optional[Tag[str]] = None "A string that uniquely identifies the item." diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/conftest.py b/tests/conftest.py index fd02e87..0746011 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -from json import loads +import pickle from pathlib import Path import pytest @@ -9,7 +9,12 @@ @pytest.fixture def sample_and_result(request): - with open(sample_dir / f"{request.param[0]}.xml", encoding="utf-8") as sample: - plain = len(request.param) > 1 and request.param[1] - with open(sample_dir / f"{request.param[0]}{'_plain' if plain else ''}.json", encoding="utf-8") as result: - return sample.read(), loads(result.read()) + sample_name = request.param[0] + + with open(sample_dir / sample_name / "data.xml", encoding="utf-8") as sample_file: + sample = sample_file.read() + + with open(sample_dir / sample_name / "result.pkl", "rb") as result_file: + result = pickle.load(result_file) + + return sample, result diff --git a/tests/samples/apology_line.json b/tests/samples/apology_line.json deleted file mode 100644 index c19d110..0000000 --- a/tests/samples/apology_line.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "channel": { - "attributes": {}, - "content": { - "category": null, - "cloud": null, - "copyright": { - "attributes": {}, - "content": "\u00a9 2021 Wondery, Inc. All rights reserved" - }, - "description": { - "attributes": {}, - "content": "
If you could call a number and say you\u2019re sorry, and no one would know\u2026what would you apologize for? For fifteen years, you could call a number in Manhattan and do just that. This is the story of the line, and the man at the other end who became consumed by his own creation. He was known as \u201cMr. Apology.\u201d As thousands of callers flooded the line, confessing to everything from shoplifting to infidelity, drug dealing to murder, Mr. Apology realized he couldn\u2019t just listen. He had to do something, even if it meant risking everything. From Wondery the makers of Dr. Death and The Shrink Next Door, comes a story about empathy, deception and obsession. Marissa Bridge, who knew Mr. Apology better than anyone, hosts this six episode series.
All episodes are available now. You can binge the series ad-free on Wondery+ or on Amazon Music with a Prime membership or Amazon Music Unlimited subscription.
" - }, - "docs": null, - "generator": { - "attributes": {}, - "content": "ART19" - }, - "image": { - "attributes": {}, - "content": { - "description": null, - "height": null, - "link": { - "attributes": {}, - "content": "https://wondery.com/shows/the-apology-line/?utm_source=rss" - }, - "title": { - "attributes": {}, - "content": "The Apology Line" - }, - "url": { - "attributes": {}, - "content": "https://content.production.cdn.art19.com/images/be/e1/82/c2/bee182c2-14b7-491b-b877-272ab6754025/bd4ab6d08d7b723678a682b6e399d26523245b3ba83f61617b9b28396aba1092b101cd86707576ec021b77e143b447463342b352f8825265b15310c989b6cb93.jpeg" - }, - "width": null - } - }, - "items": [ - { - "attributes": {}, - "content": { - "author": null, - "category": null, - "comments": null, - "description": { - "attributes": {}, - "content": "When Elon Musk posted a video of himself arriving at Twitter HQ carrying a white sink along with the message \u201clet that sink in!\u201d It marked the end of a dramatic takeover. Musk had gone from Twitter critic to \u201cChief Twit\u201d in the space of just a few months but his arrival didn\u2019t put an end to questions about his motives. Musk had earned a reputation as a business maverick. From PayPal to Tesla to SpaceX, his name was synonymous with big, earth-shattering ideas. So, what did he want with a social media platform? And was this all really in the name of free speech...or was this all in the name of Elon Musk?
From Wondery, the makers of WeCrashed and In God We Lust, comes the wild story of how the richest man alive took charge of the world\u2019s \u201cdigital public square.\u201d
Listen to Flipping The Bird: Wondery.fm/FTB_TAL
See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.
" - }, - "enclosure": { - "attributes": { - "length": "4824502", - "type": "audio/mpeg", - "url": "https://dts.podtrac.com/redirect.mp3/chrt.fm/track/9EE2G/pdst.fm/e/rss.art19.com/episodes/7bfce2e9-7889-480a-afde-46e810e82b1a.mp3?rss_browser=BAhJIhRweXRob24tcmVxdWVzdHMGOgZFVA%3D%3D--ac965bdf6559f894a935511702ea4ac963845aca" - }, - "content": null - }, - "guid": { - "attributes": { - "is_perma_link": "false" - }, - "content": "gid://art19-episode-locator/V0/tdroPC934g1_yKpnqnfmA67RAho9P0W6PUiIY-tBw3U" - }, - "link": null, - "pub_date": { - "attributes": {}, - "content": "Mon, 01 May 2023 08:00:00 -0000" - }, - "source": null, - "title": { - "attributes": {}, - "content": "Wondery Presents - Flipping The Bird: Elon vs Twitter" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": null, - "comments": null, - "description": { - "attributes": {}, - "content": "If you could call a number and say you\u2019re sorry, and no one would know\u2026what would you apologize for? For fifteen years, you could call a number in Manhattan and do just that. This is the story of the line, and the man at the other end who became consumed by his own creation. He was known as \u201cMr. Apology.\u201d As thousands of callers flooded the line, confessing to everything from shoplifting to infidelity, drug dealing to murder, Mr. Apology realized he couldn\u2019t just listen. He had to do something, even if it meant risking everything. From Wondery the makers of Dr Death and The Shrink Next Door, comes a story about empathy, deception and obsession. Marissa Bridge, who knew Mr. Apology better than anyone, hosts this six episode series.
All episodes are available now. You can binge the series ad-free on Wondery+ or on Amazon Music with a Prime membership or Amazon Music Unlimited subscription.
See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.
" - }, - "enclosure": { - "attributes": { - "length": "2320091", - "type": "audio/mpeg", - "url": "https://dts.podtrac.com/redirect.mp3/chrt.fm/track/9EE2G/pdst.fm/e/rss.art19.com/episodes/a462e9fa-5e7b-4b0a-b992-d59fa1ca06cd.mp3?rss_browser=BAhJIhRweXRob24tcmVxdWVzdHMGOgZFVA%3D%3D--ac965bdf6559f894a935511702ea4ac963845aca" - }, - "content": null - }, - "guid": { - "attributes": { - "is_perma_link": "false" - }, - "content": "gid://art19-episode-locator/V0/2E7Nce-ZiX0Rmo017w7js5BvvKiOIMjWELujxOvJync" - }, - "link": null, - "pub_date": { - "attributes": {}, - "content": "Tue, 05 Jan 2021 03:26:59 -0000" - }, - "source": null, - "title": { - "attributes": {}, - "content": "Introducing: The Apology Line" - } - } - } - ], - "language": { - "attributes": {}, - "content": "en" - }, - "last_build_date": null, - "link": { - "attributes": {}, - "content": "https://wondery.com/shows/the-apology-line/?utm_source=rss" - }, - "managing_editor": { - "attributes": {}, - "content": "iwonder@wondery.com (Wondery)" - }, - "pub_date": null, - "rating": null, - "skip_days": null, - "skip_hours": null, - "text_input": null, - "title": { - "attributes": {}, - "content": "The Apology Line" - }, - "ttl": null, - "web_master": null - } - }, - "version": { - "attributes": {}, - "content": "2.0" - } -} \ No newline at end of file diff --git a/tests/samples/apology_line.xml b/tests/samples/apology_line/data.xml similarity index 98% rename from tests/samples/apology_line.xml rename to tests/samples/apology_line/data.xml index 84869ec..6f0b4d9 100644 --- a/tests/samples/apology_line.xml +++ b/tests/samples/apology_line/data.xml @@ -59,6 +59,7 @@ See Privacy Policy at https://art19.com/privacy and California Privacy Notice atIf you could call a number and say you\u2019re sorry, and no one would know\u2026what would you apologize for? For fifteen years, you could call a number in Manhattan and do just that. This is the story of the line, and the man at the other end who became consumed by his own creation. He was known as \u201cMr. Apology.\u201d As thousands of callers flooded the line, confessing to everything from shoplifting to infidelity, drug dealing to murder, Mr. Apology realized he couldn\u2019t just listen. He had to do something, even if it meant risking everything. From Wondery the makers of Dr. Death and The Shrink Next Door, comes a story about empathy, deception and obsession. Marissa Bridge, who knew Mr. Apology better than anyone, hosts this six episode series.
All episodes are available now. You can binge the series ad-free on Wondery+ or on Amazon Music with a Prime membership or Amazon Music Unlimited subscription.
", - "docs": null, - "generator": "ART19", - "image": { - "description": null, - "height": null, - "link": "https://wondery.com/shows/the-apology-line/?utm_source=rss", - "title": "The Apology Line", - "url": "https://content.production.cdn.art19.com/images/be/e1/82/c2/bee182c2-14b7-491b-b877-272ab6754025/bd4ab6d08d7b723678a682b6e399d26523245b3ba83f61617b9b28396aba1092b101cd86707576ec021b77e143b447463342b352f8825265b15310c989b6cb93.jpeg", - "width": null - }, - "items": [ - { - "author": null, - "category": null, - "comments": null, - "description": "When Elon Musk posted a video of himself arriving at Twitter HQ carrying a white sink along with the message \u201clet that sink in!\u201d It marked the end of a dramatic takeover. Musk had gone from Twitter critic to \u201cChief Twit\u201d in the space of just a few months but his arrival didn\u2019t put an end to questions about his motives. Musk had earned a reputation as a business maverick. From PayPal to Tesla to SpaceX, his name was synonymous with big, earth-shattering ideas. So, what did he want with a social media platform? And was this all really in the name of free speech...or was this all in the name of Elon Musk?
From Wondery, the makers of WeCrashed and In God We Lust, comes the wild story of how the richest man alive took charge of the world\u2019s \u201cdigital public square.\u201d
Listen to Flipping The Bird: Wondery.fm/FTB_TAL
See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.
", - "enclosure": null, - "guid": "gid://art19-episode-locator/V0/tdroPC934g1_yKpnqnfmA67RAho9P0W6PUiIY-tBw3U", - "link": null, - "pub_date": "Mon, 01 May 2023 08:00:00 -0000", - "source": null, - "title": "Wondery Presents - Flipping The Bird: Elon vs Twitter" - }, - { - "author": null, - "category": null, - "comments": null, - "description": "If you could call a number and say you\u2019re sorry, and no one would know\u2026what would you apologize for? For fifteen years, you could call a number in Manhattan and do just that. This is the story of the line, and the man at the other end who became consumed by his own creation. He was known as \u201cMr. Apology.\u201d As thousands of callers flooded the line, confessing to everything from shoplifting to infidelity, drug dealing to murder, Mr. Apology realized he couldn\u2019t just listen. He had to do something, even if it meant risking everything. From Wondery the makers of Dr Death and The Shrink Next Door, comes a story about empathy, deception and obsession. Marissa Bridge, who knew Mr. Apology better than anyone, hosts this six episode series.
All episodes are available now. You can binge the series ad-free on Wondery+ or on Amazon Music with a Prime membership or Amazon Music Unlimited subscription.
See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.
", - "enclosure": null, - "guid": "gid://art19-episode-locator/V0/2E7Nce-ZiX0Rmo017w7js5BvvKiOIMjWELujxOvJync", - "link": null, - "pub_date": "Tue, 05 Jan 2021 03:26:59 -0000", - "source": null, - "title": "Introducing: The Apology Line" - } - ], - "language": "en", - "last_build_date": null, - "link": "https://wondery.com/shows/the-apology-line/?utm_source=rss", - "managing_editor": "iwonder@wondery.com (Wondery)", - "pub_date": null, - "rating": null, - "skip_days": null, - "skip_hours": null, - "text_input": null, - "title": "The Apology Line", - "ttl": null, - "web_master": null - }, - "version": "2.0" -} \ No newline at end of file diff --git a/tests/samples/atom.json b/tests/samples/atom.json deleted file mode 100644 index e67cb22..0000000 --- a/tests/samples/atom.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "feed": { - "attributes": {}, - "content": { - "authors": [], - "categories": [], - "contributors": [], - "entries": [ - { - "attributes": {}, - "content": { - "authors": [ - { - "attributes": {}, - "content": { - "email": { - "attributes": {}, - "content": "mail@example.com" - }, - "name": { - "attributes": {}, - "content": "John Doe" - }, - "uri": { - "attributes": {}, - "content": "http://example.org/" - } - } - } - ], - "categories": [], - "content": { - "attributes": { - "type": "xhtml", - "xml:base": "http://diveintomark.org/", - "xml:lang": "en" - }, - "content": "[Update: The Atom draft is finished.]" - }, - "contributors": [ - { - "attributes": {}, - "content": { - "email": null, - "name": { - "attributes": {}, - "content": "John Doe" - }, - "uri": null - } - } - ], - "id": { - "attributes": {}, - "content": "tag:example.org,2003:3.2397" - }, - "links": [ - { - "attributes": { - "href": "http://example.org/2005/04/02/atom", - "rel": "alternate", - "type": "text/html" - }, - "content": null - }, - { - "attributes": { - "href": "http://example.org/audio/ph34r_my_podcast.mp3", - "length": "1337", - "rel": "enclosure", - "type": "audio/mpeg" - }, - "content": null - } - ], - "published": { - "attributes": {}, - "content": "2003-12-13T08:29:29-04:00" - }, - "rights": null, - "source": null, - "summary": null, - "title": { - "attributes": {}, - "content": "Atom draft-07 snapshot" - }, - "updated": { - "attributes": {}, - "content": "2005-07-31T12:29:29+00:00" - } - } - } - ], - "generator": { - "attributes": { - "uri": "http://www.example.com/", - "version": "1.0" - }, - "content": "Example Toolkit" - }, - "icon": null, - "id": { - "attributes": {}, - "content": "tag:example.org,2003:3" - }, - "links": [ - { - "attributes": { - "href": "http://example.org/", - "hreflang": "en", - "rel": "alternate", - "type": "text/html" - }, - "content": null - }, - { - "attributes": { - "href": "http://example.org/feed.atom", - "rel": "self", - "type": "application/atom+xml" - }, - "content": null - } - ], - "logo": null, - "rights": { - "attributes": {}, - "content": "Copyright (c) 2003, John Doe" - }, - "subtitle": { - "attributes": { - "type": "html" - }, - "content": "A lot of effort\n went into making this effortless" - }, - "title": { - "attributes": { - "type": "text" - }, - "content": "Title" - }, - "updated": { - "attributes": {}, - "content": "2005-07-31T12:29:29+00:00" - } - } - }, - "version": null -} \ No newline at end of file diff --git a/tests/samples/atom.xml b/tests/samples/atom/data.xml similarity index 100% rename from tests/samples/atom.xml rename to tests/samples/atom/data.xml diff --git a/tests/samples/atom/result.pkl b/tests/samples/atom/result.pkl new file mode 100644 index 0000000000000000000000000000000000000000..11a703b4fe362287f0541c9e67386601490d3832 GIT binary patch literal 1510 zcmbVM&ubhv6n5iT?|N}*AgP;@n2JDQOOl<9H^F2HB_Ykl0UwG>55X9D_w7hnBMtfy z+krqXNiMoY{mV*E{bSlEY1ZD9J#}E1dD7GS^?je-7k~WSSxe8mF!0?spbb|t9Qa}m zFbipMs-y*Jvw=UFg9%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aurant's communicate with customers. Let your customers know the latest specials or events.
\n
\nRSS feed uses include:
\nDaily Specials
\nEntertainment
\nCalendar of Events " - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/restaurant.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:11 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Restaurants" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Educational Institutions communicate with students about school wide activities, events, and schedules.
\n
\nRSS feed uses include:
\nHomework Assignments
\nSchool Cancellations
\nCalendar of Events
\nSports Scores
\nClubs/Organization Meetings
\nLunches Menus " - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/schools.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:09 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Schools and Colleges" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Computer Service Companies communicate with clients about cyber security and related issues.
\n
\nUses include:
\nCyber Security Alerts
\nSpecials
\nJob Postings " - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/computer-service.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:07 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Computer Service Companies" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Governments communicate with the general public about positions on various issues, and keep the community aware of changes in important legislative issues.
\n
\nRSS uses Include:
\nLegislative Calendar
\nVotes
\nBulletins" - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/government.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:05 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Governments" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Politicians communicate with the general public about positions on various issues, and keep the community notified of their schedule.
\n
\nUses Include:
\nBlogs
\nSpeaking Engagements
\nStatements
\n " - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/politics.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:03 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Politicians" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Meteorologists communicate with the general public about storm warnings and weather alerts, in specific regions. Using RSS meteorologists are able to quickly disseminate urgent and life threatening weather warnings.
\n
\nUses Include:
\nWeather Alerts
\nPlotting Storms
\nSchool Cancellations " - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/weather.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:01 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Meteorologists" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Realtors and Real Estate companies communicate with clients informing them of newly available properties, and open house announcements. RSS helps to reach a targeted audience and spread the word in an inexpensive, professional manner.
\n
\nFeeds can be used for:
\nOpen House Dates
\nNew Properties For Sale
\nMortgage Rates" - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/real-estate.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:08:59 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Realtors & Real Estate Firms" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Banks, Credit Unions and Mortgage companies communicate with the general public about rate changes in a prompt and professional manner.
\n
\nUses include:
\nMortgage Rates
\nForeign Exchange Rates
\nBank Rates
\nSpecials" - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/banks.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:08:57 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Banks / Mortgage Companies" - } - } - }, - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Law Enforcement Professionals communicate with the general public and other agencies in a prompt and efficient manner. Using RSS police are able to quickly disseminate urgent and life threatening information.
\n
\nUses include:
\nAmber Alerts
\nSex Offender Community Notification
\nWeather Alerts
\nScheduling
\nSecurity Alerts
\nPolice Report
\nMeetings" - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/law-enforcement.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:08:56 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Law Enforcement" - } - } - } - ], - "language": { - "attributes": {}, - "content": "en-us" - }, - "last_build_date": { - "attributes": {}, - "content": "2004-10-19T13:39:14-04:00" - }, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/industry-solutions.htm" - }, - "managing_editor": { - "attributes": {}, - "content": "marketing@feedforall.com" - }, - "pub_date": { - "attributes": {}, - "content": "2004-10-19T13:38:55-04:00" - }, - "rating": null, - "skip_days": null, - "skip_hours": null, - "text_input": null, - "title": { - "attributes": {}, - "content": "FeedForAll Sample Feed" - }, - "ttl": null, - "web_master": { - "attributes": {}, - "content": "webmaster@feedforall.com" - } - } - }, - "version": { - "attributes": {}, - "content": "2.0" - } -} \ No newline at end of file diff --git a/tests/samples/rss_2.xml b/tests/samples/rss_2/data.xml similarity index 100% rename from tests/samples/rss_2.xml rename to tests/samples/rss_2/data.xml diff --git a/tests/samples/rss_2/result.pkl b/tests/samples/rss_2/result.pkl new file mode 100644 index 0000000000000000000000000000000000000000..2d6549e272784022a55b026dfbe519f323a6b828 GIT binary patch literal 7338 zcmds+O>Y~=8OIgak}ai84n>2eP0)#hC{7|RsnkhqK^0;%Qe(%K1Tk)NF@)jnkUQ4y z3_CL`N(KV-()O~qu;-$eeuaLKeuI9CUfTaNvrADTsYEH#g9Jz*N3-+H%WwYA%l_f| zU;g^Wod5ZHc)PrDB#f0>4gHr`D<_m2me)Rvn!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qZO;@u{SqI=u&}7TTOWgj5M$Q<#%gTfbL1m85bG zDP@<2PCjdfBc4YLJEFEKtkT-$g)<5-5z2X3Jlr+x$&wSt?m#N!9O=m(%KiZyKV$K< z=${gPf`>Xme_`)0?*gWf$p40`trzhRl6#5VI_q*9Q;_7{SDde+xbY-npCda3udjLo zh1w*Ca4q2wP}PK9yr338gitbiEe2J}v_53q!LuEl=B>islLk`{g%9CKvpYzAbtRIP Z@R$8;RFyjDP#t)!$c=_$4x3s;{{sZ8EF1s; literal 0 HcmV?d00001 diff --git a/tests/samples/rss_2_no_category_attr_plain.json b/tests/samples/rss_2_no_category_attr_plain.json deleted file mode 100644 index d404ff4..0000000 --- a/tests/samples/rss_2_no_category_attr_plain.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "channel": { - "category": "Computers/Software/Internet/Site Management/Content Management", - "cloud": null, - "copyright": "Copyright 2004 NotePage, Inc.", - "description": "RSS is a fascinating technology. The uses for RSS are expanding daily. Take a closer look at how various industries are using the benefits of RSS in their businesses.", - "docs": "http://blogs.law.harvard.edu/tech/rss", - "generator": "FeedForAll Beta1 (0.0.1.8)", - "image": { - "description": "FeedForAll Sample Feed", - "height": 48, - "link": "http://www.feedforall.com/industry-solutions.htm", - "title": "FeedForAll Sample Feed", - "url": "http://www.feedforall.com/ffalogo48x48.gif", - "width": 48 - }, - "items": [ - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Restaurant's communicate with customers. Let your customers know the latest specials or events.
\n
\nRSS feed uses include:
\nDaily Specials
\nEntertainment
\nCalendar of Events ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/restaurant.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:11 -0400", - "source": null, - "title": "RSS Solutions for Restaurants" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Educational Institutions communicate with students about school wide activities, events, and schedules.
\n
\nRSS feed uses include:
\nHomework Assignments
\nSchool Cancellations
\nCalendar of Events
\nSports Scores
\nClubs/Organization Meetings
\nLunches Menus ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/schools.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:09 -0400", - "source": null, - "title": "RSS Solutions for Schools and Colleges" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Computer Service Companies communicate with clients about cyber security and related issues.
\n
\nUses include:
\nCyber Security Alerts
\nSpecials
\nJob Postings ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/computer-service.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:07 -0400", - "source": null, - "title": "RSS Solutions for Computer Service Companies" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Governments communicate with the general public about positions on various issues, and keep the community aware of changes in important legislative issues.
\n
\nRSS uses Include:
\nLegislative Calendar
\nVotes
\nBulletins", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/government.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:05 -0400", - "source": null, - "title": "RSS Solutions for Governments" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Politicians communicate with the general public about positions on various issues, and keep the community notified of their schedule.
\n
\nUses Include:
\nBlogs
\nSpeaking Engagements
\nStatements
\n ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/politics.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:03 -0400", - "source": null, - "title": "RSS Solutions for Politicians" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Meteorologists communicate with the general public about storm warnings and weather alerts, in specific regions. Using RSS meteorologists are able to quickly disseminate urgent and life threatening weather warnings.
\n
\nUses Include:
\nWeather Alerts
\nPlotting Storms
\nSchool Cancellations ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/weather.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:01 -0400", - "source": null, - "title": "RSS Solutions for Meteorologists" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Realtors and Real Estate companies communicate with clients informing them of newly available properties, and open house announcements. RSS helps to reach a targeted audience and spread the word in an inexpensive, professional manner.
\n
\nFeeds can be used for:
\nOpen House Dates
\nNew Properties For Sale
\nMortgage Rates", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/real-estate.htm", - "pub_date": "Tue, 19 Oct 2004 11:08:59 -0400", - "source": null, - "title": "RSS Solutions for Realtors & Real Estate Firms" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Banks, Credit Unions and Mortgage companies communicate with the general public about rate changes in a prompt and professional manner.
\n
\nUses include:
\nMortgage Rates
\nForeign Exchange Rates
\nBank Rates
\nSpecials", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/banks.htm", - "pub_date": "Tue, 19 Oct 2004 11:08:57 -0400", - "source": null, - "title": "RSS Solutions for Banks / Mortgage Companies" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Law Enforcement Professionals communicate with the general public and other agencies in a prompt and efficient manner. Using RSS police are able to quickly disseminate urgent and life threatening information.
\n
\nUses include:
\nAmber Alerts
\nSex Offender Community Notification
\nWeather Alerts
\nScheduling
\nSecurity Alerts
\nPolice Report
\nMeetings", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/law-enforcement.htm", - "pub_date": "Tue, 19 Oct 2004 11:08:56 -0400", - "source": null, - "title": "RSS Solutions for Law Enforcement" - } - ], - "language": "en-us", - "last_build_date": "2004-10-19T13:39:14-04:00", - "link": "http://www.feedforall.com/industry-solutions.htm", - "managing_editor": "marketing@feedforall.com", - "pub_date": "2004-10-19T13:38:55-04:00", - "rating": null, - "skip_days": null, - "skip_hours": null, - "text_input": null, - "title": "FeedForAll Sample Feed", - "ttl": null, - "web_master": "webmaster@feedforall.com" - }, - "version": "2.0" -} \ No newline at end of file diff --git a/tests/samples/rss_2_plain.json b/tests/samples/rss_2_plain.json deleted file mode 100644 index d404ff4..0000000 --- a/tests/samples/rss_2_plain.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "channel": { - "category": "Computers/Software/Internet/Site Management/Content Management", - "cloud": null, - "copyright": "Copyright 2004 NotePage, Inc.", - "description": "RSS is a fascinating technology. The uses for RSS are expanding daily. Take a closer look at how various industries are using the benefits of RSS in their businesses.", - "docs": "http://blogs.law.harvard.edu/tech/rss", - "generator": "FeedForAll Beta1 (0.0.1.8)", - "image": { - "description": "FeedForAll Sample Feed", - "height": 48, - "link": "http://www.feedforall.com/industry-solutions.htm", - "title": "FeedForAll Sample Feed", - "url": "http://www.feedforall.com/ffalogo48x48.gif", - "width": 48 - }, - "items": [ - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Restaurant's communicate with customers. Let your customers know the latest specials or events.
\n
\nRSS feed uses include:
\nDaily Specials
\nEntertainment
\nCalendar of Events ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/restaurant.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:11 -0400", - "source": null, - "title": "RSS Solutions for Restaurants" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Educational Institutions communicate with students about school wide activities, events, and schedules.
\n
\nRSS feed uses include:
\nHomework Assignments
\nSchool Cancellations
\nCalendar of Events
\nSports Scores
\nClubs/Organization Meetings
\nLunches Menus ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/schools.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:09 -0400", - "source": null, - "title": "RSS Solutions for Schools and Colleges" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Computer Service Companies communicate with clients about cyber security and related issues.
\n
\nUses include:
\nCyber Security Alerts
\nSpecials
\nJob Postings ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/computer-service.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:07 -0400", - "source": null, - "title": "RSS Solutions for Computer Service Companies" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Governments communicate with the general public about positions on various issues, and keep the community aware of changes in important legislative issues.
\n
\nRSS uses Include:
\nLegislative Calendar
\nVotes
\nBulletins", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/government.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:05 -0400", - "source": null, - "title": "RSS Solutions for Governments" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Politicians communicate with the general public about positions on various issues, and keep the community notified of their schedule.
\n
\nUses Include:
\nBlogs
\nSpeaking Engagements
\nStatements
\n ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/politics.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:03 -0400", - "source": null, - "title": "RSS Solutions for Politicians" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Meteorologists communicate with the general public about storm warnings and weather alerts, in specific regions. Using RSS meteorologists are able to quickly disseminate urgent and life threatening weather warnings.
\n
\nUses Include:
\nWeather Alerts
\nPlotting Storms
\nSchool Cancellations ", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/weather.htm", - "pub_date": "Tue, 19 Oct 2004 11:09:01 -0400", - "source": null, - "title": "RSS Solutions for Meteorologists" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Realtors and Real Estate companies communicate with clients informing them of newly available properties, and open house announcements. RSS helps to reach a targeted audience and spread the word in an inexpensive, professional manner.
\n
\nFeeds can be used for:
\nOpen House Dates
\nNew Properties For Sale
\nMortgage Rates", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/real-estate.htm", - "pub_date": "Tue, 19 Oct 2004 11:08:59 -0400", - "source": null, - "title": "RSS Solutions for Realtors & Real Estate Firms" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Banks, Credit Unions and Mortgage companies communicate with the general public about rate changes in a prompt and professional manner.
\n
\nUses include:
\nMortgage Rates
\nForeign Exchange Rates
\nBank Rates
\nSpecials", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/banks.htm", - "pub_date": "Tue, 19 Oct 2004 11:08:57 -0400", - "source": null, - "title": "RSS Solutions for Banks / Mortgage Companies" - }, - { - "author": null, - "category": "Computers/Software/Internet/Site Management/Content Management", - "comments": "http://www.feedforall.com/forum", - "description": "FeedForAll helps Law Enforcement Professionals communicate with the general public and other agencies in a prompt and efficient manner. Using RSS police are able to quickly disseminate urgent and life threatening information.
\n
\nUses include:
\nAmber Alerts
\nSex Offender Community Notification
\nWeather Alerts
\nScheduling
\nSecurity Alerts
\nPolice Report
\nMeetings", - "enclosure": null, - "guid": null, - "link": "http://www.feedforall.com/law-enforcement.htm", - "pub_date": "Tue, 19 Oct 2004 11:08:56 -0400", - "source": null, - "title": "RSS Solutions for Law Enforcement" - } - ], - "language": "en-us", - "last_build_date": "2004-10-19T13:39:14-04:00", - "link": "http://www.feedforall.com/industry-solutions.htm", - "managing_editor": "marketing@feedforall.com", - "pub_date": "2004-10-19T13:38:55-04:00", - "rating": null, - "skip_days": null, - "skip_hours": null, - "text_input": null, - "title": "FeedForAll Sample Feed", - "ttl": null, - "web_master": "webmaster@feedforall.com" - }, - "version": "2.0" -} \ No newline at end of file diff --git a/tests/samples/rss_2_with_1_item.json b/tests/samples/rss_2_with_1_item.json deleted file mode 100644 index d78c35c..0000000 --- a/tests/samples/rss_2_with_1_item.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "channel": { - "attributes": {}, - "content": { - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "cloud": null, - "copyright": { - "attributes": {}, - "content": "Copyright 2004 NotePage, Inc." - }, - "description": { - "attributes": {}, - "content": "RSS is a fascinating technology. The uses for RSS are expanding daily. Take a closer look at how various industries are using the benefits of RSS in their businesses." - }, - "docs": { - "attributes": {}, - "content": "http://blogs.law.harvard.edu/tech/rss" - }, - "generator": { - "attributes": {}, - "content": "FeedForAll Beta1 (0.0.1.8)" - }, - "image": { - "attributes": {}, - "content": { - "description": { - "attributes": {}, - "content": "FeedForAll Sample Feed" - }, - "height": { - "attributes": {}, - "content": 48 - }, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/industry-solutions.htm" - }, - "title": { - "attributes": {}, - "content": "FeedForAll Sample Feed" - }, - "url": { - "attributes": {}, - "content": "http://www.feedforall.com/ffalogo48x48.gif" - }, - "width": { - "attributes": {}, - "content": 48 - } - } - }, - "items": [ - { - "attributes": {}, - "content": { - "author": null, - "category": { - "attributes": { - "domain": "www.dmoz.com" - }, - "content": "Computers/Software/Internet/Site Management/Content Management" - }, - "comments": { - "attributes": {}, - "content": "http://www.feedforall.com/forum" - }, - "description": { - "attributes": {}, - "content": "FeedForAll helps Restaurant's communicate with customers. Let your customers know the latest specials or events.
\n
\nRSS feed uses include:
\nDaily Specials
\nEntertainment
\nCalendar of Events " - }, - "enclosure": null, - "guid": null, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/restaurant.htm" - }, - "pub_date": { - "attributes": {}, - "content": "Tue, 19 Oct 2004 11:09:11 -0400" - }, - "source": null, - "title": { - "attributes": {}, - "content": "RSS Solutions for Restaurants" - } - } - } - ], - "language": { - "attributes": {}, - "content": "en-us" - }, - "last_build_date": { - "attributes": {}, - "content": "2004-10-19T13:39:14-04:00" - }, - "link": { - "attributes": {}, - "content": "http://www.feedforall.com/industry-solutions.htm" - }, - "managing_editor": { - "attributes": {}, - "content": "marketing@feedforall.com" - }, - "pub_date": { - "attributes": {}, - "content": "2004-10-19T13:38:55-04:00" - }, - "rating": null, - "skip_days": null, - "skip_hours": null, - "text_input": null, - "title": { - "attributes": {}, - "content": "FeedForAll Sample Feed" - }, - "ttl": null, - "web_master": { - "attributes": {}, - "content": "webmaster@feedforall.com" - } - } - }, - "version": { - "attributes": {}, - "content": "2.0" - } -} \ No newline at end of file diff --git a/tests/samples/rss_2_with_1_item.xml b/tests/samples/rss_2_with_1_item/data.xml similarity index 100% rename from tests/samples/rss_2_with_1_item.xml rename to tests/samples/rss_2_with_1_item/data.xml diff --git a/tests/samples/rss_2_with_1_item/result.pkl b/tests/samples/rss_2_with_1_item/result.pkl new file mode 100644 index 0000000000000000000000000000000000000000..2d3b0cec6513910eaece8a64b5845f97f316c245 GIT binary patch literal 1897 zcmcIlTW=dh6b?%4B<9iwBm{_xp$HnPX1%T=kw(U9F^$v~3X1z$tl8bOo{?u~R&$Bt zN|ks4UgoXKU*H$f133fO`N8~#y=>iHwFq}3>E{Q7Edr|p*rV7es<= =WmKDFdd93PR<=p?>-G8&P?_$ZEBZ+)YjP5~YCEVrVw zzJ4~Fk(m RZD+xHGag}+D6Q_iBSJ$1}4?K3^7{N ze~y#MDdv8v^nD@7c$iEWh|*k&e$$XpI45~%7g=%3Na~DL1vV-o--0D;%xNPdOQ}}G zG9UsCj3uUolv7~{W(DV=1JO9qlR^Cx5)aiU&VV5tYwa>PY3})CoMW3YzEJwB8=sz@ z#`xTrd_%cdlUe7sR(=o$#bW0}i%Bh-QUNlfny8#SsN-US=o8y3?W8HHt4mA$o}hB! zaJbsS^gtfEuJHS*D%YAXm~C&bPdh==>L<#=4`_UwJd|nF4bBRZc|i^0YR%q9Nh7%T z&w*FT-&^95WD>;`z~E z_&mDz!5dqTw|=e8s-N-w1>a_nt_egnPaGH7r4eS6Hp0z!>InDQ^k3buYYp80d2RO> zAVE`$l+ncd@Y2A34VI3`K^(==C_4V4&2J}DX}9H{wOf)1wJ?#OtB6s3PIVSR=7tth zHq@qTbPqS(h3($9R)ihp#jBCP;C|cbmfQTTtG6%DDF#zV#}`M((Sqk~cRy+1zjq1# zj25K;5+oh;u;Xo_@zo)?%y0$u`p|Tou~~HATk*`Y#>wNjX?dT)W`0{CyY(7~ng#KF z>;RVwtjWN_g`IPWOdU>U$;&xI0x)>muTL3W Q uD_qncrAYDI1Qb0Kh1Qkh{|Bnym!T678MB=9|GB9vMZY6(L+!-?U_ s1%j#z&ylNw2WNtH;JO5-H0KscE+;h_8N^(ZB