diff --git a/rss/pyproject.toml b/rss/pyproject.toml index fdddcf4..b31926a 100644 --- a/rss/pyproject.toml +++ b/rss/pyproject.toml @@ -8,6 +8,7 @@ version = "0.1.0" description = "A project to fetch data from RSS feeds and publish them as CloudEvents" authors = ["Clemens Vasters "] + [tool.poetry.dependencies] python = ">=3.8" requests = ">=2.32.3" diff --git a/rss/rssbridge/rssbridge.py b/rss/rssbridge/rssbridge.py index 90c20cd..5c78485 100644 --- a/rss/rssbridge/rssbridge.py +++ b/rss/rssbridge/rssbridge.py @@ -23,6 +23,8 @@ from requests import RequestException +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../rssbridge_producer"))) + from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemauthor import FeedItemAuthor from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemcontent import FeedItemContent from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsource import FeedItemSource @@ -32,6 +34,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsummary import FeedItemSummary from rssbridge_producer_kafka_producer.producer import MicrosoftOpenDataRssFeedsEventProducer from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditem import FeedItem +from rssbridge_producer_data.microsoft.opendata.rssfeeds.link import Link # Logging configuration if sys.gettrace() is not None: @@ -195,7 +198,7 @@ def remove_feed(url: str): save_feedstore(feed_urls) -def feeditem_from_feedparser_entry(entry) -> FeedItem: +def feeditem_from_feedparser_entry(feed, entry) -> FeedItem: """ Create a FeedItem instance from a feedparser entry. @@ -295,12 +298,12 @@ def parse_date(parsed_date_value) -> datetime|None: return datetime.fromisoformat(parsed_date_value).astimezone(timezone.utc) return None - return FeedItem( + feed_item = FeedItem( author=parse_author_detail(entry.get('author_detail')), publisher=parse_publisher_detail(entry.get('publisher_detail')), summary=parse_summary_detail(entry.get('summary_detail')), title=parse_title_detail(entry.get('title_detail')), - source=parse_source_detail(entry.get('source')), + source=None, content=parse_content_detail(entry.get('content')), enclosures=parse_enclosure_detail(entry.get('enclosures')), published=parse_date(entry.get('published_parsed')), @@ -313,6 +316,24 @@ def parse_date(parsed_date_value) -> datetime|None: contributors=[parse_author_detail(contrib) for contrib in entry.get('contributors', [])], links=entry.get('links') ) + if not feed_item.source: + feed_item.source = FeedItemSource( + author=entry.get('author'), + author_detail=parse_author_detail(entry.get('author_detail')), + contributors=[parse_author_detail(contrib) for contrib in entry.get('contributors', [])], + icon=feed.feed.get('image').get('href') if feed.feed.get('image') else None, + id=entry.get('id'), + link=feed.feed.get('link'), + links=[], + logo=feed.feed.get('image').get('href') if feed.feed.get('image') else None, + rights=feed.feed.get('rights'), + subtitle=feed.feed.get('subtitle'), + title=feed.feed.get('title'), + updated=parse_date(feed.feed.get('updated_parsed')) + ) + for link in feed.feed.get('links'): + feed_item.source.links.append(Link(title=link.get('title'), href=link.get('href'), rel=link.get('rel'), type=link.get('type'))) + return feed_item def fetch_feed(url: str, etag: Optional[str] = None) -> requests.Response: @@ -391,7 +412,7 @@ async def process_feed(feed_url: str, state: dict, producer_instance: MicrosoftO if 'published_parsed' in entry and entry.published_parsed: # won't handle entries without pub date pub_date = datetime(*entry.published_parsed[:6], tzinfo=timezone.utc) if pub_date > last_checked_datetime: - item = feeditem_from_feedparser_entry(entry) + item: FeedItem = feeditem_from_feedparser_entry(feed, entry) try: new_items.append(item) except Exception as e: diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditem.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditem.py index fc15e27..8c68100 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditem.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditem.py @@ -8,15 +8,16 @@ import dataclasses import dataclasses_json import json -from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsummary import FeedItemSummary -from datetime import datetime -from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemenclosure import FeedItemEnclosure +from marshmallow import fields from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsource import FeedItemSource +from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsummary import FeedItemSummary from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemauthor import FeedItemAuthor -from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditempublisher import FeedItemPublisher from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemcontent import FeedItemContent -from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemtitle import FeedItemTitle +from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditempublisher import FeedItemPublisher from rssbridge_producer_data.microsoft.opendata.rssfeeds.link import Link +from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemtitle import FeedItemTitle +from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemenclosure import FeedItemEnclosure +import datetime @dataclasses_json.dataclass_json @@ -25,23 +26,23 @@ class FeedItem: """ A FeedItem record. Attributes: - author (typing.Optional[FeedItemAuthor]): - publisher (typing.Optional[FeedItemPublisher]): - summary (typing.Optional[FeedItemSummary]): - title (typing.Optional[FeedItemTitle]): - source (typing.Optional[FeedItemSource]): - content (typing.Optional[typing.List[FeedItemContent]]): - enclosures (typing.Optional[typing.List[FeedItemEnclosure]]): - published (typing.Optional[datetime]): - updated (typing.Optional[datetime]): - created (typing.Optional[datetime]): - expired (typing.Optional[datetime]): - id (typing.Optional[str]): - license (typing.Optional[str]): - comments (typing.Optional[str]): - contributors (typing.Optional[typing.List[FeedItemAuthor]]): + author (typing.Optional[FeedItemAuthor]): + publisher (typing.Optional[FeedItemPublisher]): + summary (typing.Optional[FeedItemSummary]): + title (typing.Optional[FeedItemTitle]): + source (typing.Optional[FeedItemSource]): + content (typing.Optional[typing.List[FeedItemContent]]): + enclosures (typing.Optional[typing.List[FeedItemEnclosure]]): + published (typing.Optional[datetime.datetime]): + updated (typing.Optional[datetime.datetime]): + created (typing.Optional[datetime.datetime]): + expired (typing.Optional[datetime.datetime]): + id (typing.Optional[str]): + license (typing.Optional[str]): + comments (typing.Optional[str]): + contributors (typing.Optional[typing.List[FeedItemAuthor]]): links (typing.Optional[typing.List[Link]]): """ - + author: typing.Optional[FeedItemAuthor]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="author")) publisher: typing.Optional[FeedItemPublisher]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="publisher")) summary: typing.Optional[FeedItemSummary]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="summary")) @@ -49,16 +50,16 @@ class FeedItem: source: typing.Optional[FeedItemSource]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="source")) content: typing.Optional[typing.List[FeedItemContent]]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="content")) enclosures: typing.Optional[typing.List[FeedItemEnclosure]]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="enclosures")) - published: typing.Optional[datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="published")) - updated: typing.Optional[datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="updated")) - created: typing.Optional[datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="created")) - expired: typing.Optional[datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="expired")) + published: typing.Optional[datetime.datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="published", encoder=lambda d: datetime.datetime.isoformat(d) if d else None, decoder=lambda d:datetime.datetime.fromisoformat(d) if d else None, mm_field=fields.DateTime(format='iso'))) + updated: typing.Optional[datetime.datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="updated", encoder=lambda d: datetime.datetime.isoformat(d) if d else None, decoder=lambda d:datetime.datetime.fromisoformat(d) if d else None, mm_field=fields.DateTime(format='iso'))) + created: typing.Optional[datetime.datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="created", encoder=lambda d: datetime.datetime.isoformat(d) if d else None, decoder=lambda d:datetime.datetime.fromisoformat(d) if d else None, mm_field=fields.DateTime(format='iso'))) + expired: typing.Optional[datetime.datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="expired", encoder=lambda d: datetime.datetime.isoformat(d) if d else None, decoder=lambda d:datetime.datetime.fromisoformat(d) if d else None, mm_field=fields.DateTime(format='iso'))) id: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="id")) license: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="license")) comments: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="comments")) contributors: typing.Optional[typing.List[FeedItemAuthor]]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="contributors")) - links: typing.Optional[typing.List[Link]]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="links")) - + links: typing.Optional[typing.List[Link]]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="links")) + def __post_init__(self): """ Initializes the dataclass with the provided keyword arguments.""" @@ -83,10 +84,10 @@ def __post_init__(self): def from_serializer_dict(cls, data: dict) -> 'FeedItem': """ Converts a dictionary to a dataclass instance. - + Args: data: The dictionary to convert to a dataclass. - + Returns: The dataclass representation of the dictionary. """ @@ -105,7 +106,7 @@ def to_serializer_dict(self) -> dict: def _dict_resolver(self, data): """ Helps resolving the Enum values to their actual values and fixes the key names. - """ + """ def _resolve_enum(v): if isinstance(v,enum.Enum): return v.value @@ -117,7 +118,7 @@ def _fix_key(k): def to_byte_array(self, content_type_string: str) -> bytes: """ Converts the dataclass to a byte array based on the content type string. - + Args: content_type_string: The content type string to convert the dataclass to. Supported content types: @@ -126,7 +127,7 @@ def to_byte_array(self, content_type_string: str) -> bytes: '+gzip': Compresses the byte array using gzip, e.g. 'application/json+gzip'. Returns: - The byte array representation of the dataclass. + The byte array representation of the dataclass. """ content_type = content_type_string.split(';')[0].strip() result = None @@ -148,10 +149,10 @@ def to_byte_array(self, content_type_string: str) -> bytes: def from_data(cls, data: typing.Any, content_type_string: typing.Optional[str] = None) -> typing.Optional['FeedItem']: """ Converts the data to a dataclass based on the content type string. - + Args: data: The data to convert to a dataclass. - content_type_string: The content type string to convert the data to. + content_type_string: The content type string to convert the data to. Supported content types: 'application/json': Attempts to decode the data from JSON encoded format. Supported content type extensions: diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemauthor.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemauthor.py index 1f36655..ee4397f 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemauthor.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemauthor.py @@ -22,7 +22,7 @@ class FeedItemAuthor: name: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="name")) href: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="href")) - email: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="email")) + email: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="email")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemcontent.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemcontent.py index 972bad3..15157fd 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemcontent.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemcontent.py @@ -24,7 +24,7 @@ class FeedItemContent: value: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="value")) type: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="type")) language: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="language")) - base: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="base")) + base: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="base")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemenclosure.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemenclosure.py index 6cf6209..d7dac5c 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemenclosure.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemenclosure.py @@ -22,7 +22,7 @@ class FeedItemEnclosure: href: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="href")) length: typing.Optional[int]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="length")) - type: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="type")) + type: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="type")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditempublisher.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditempublisher.py index f2a46fb..bcbd7a0 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditempublisher.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditempublisher.py @@ -22,7 +22,7 @@ class FeedItemPublisher: name: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="name")) href: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="href")) - email: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="email")) + email: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="email")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsource.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsource.py index 2ba40ff..8d10329 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsource.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsource.py @@ -8,9 +8,10 @@ import dataclasses import dataclasses_json import json +from marshmallow import fields from rssbridge_producer_data.microsoft.opendata.rssfeeds.link import Link -from datetime import datetime from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemauthor import FeedItemAuthor +import datetime @dataclasses_json.dataclass_json @@ -30,7 +31,7 @@ class FeedItemSource: rights (typing.Optional[str]): subtitle (typing.Optional[str]): title (typing.Optional[str]): - updated (typing.Optional[datetime]): """ + updated (typing.Optional[datetime.datetime]): """ author: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="author")) author_detail: typing.Optional[FeedItemAuthor]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="author_detail")) @@ -43,7 +44,7 @@ class FeedItemSource: rights: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="rights")) subtitle: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="subtitle")) title: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="title")) - updated: typing.Optional[datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="updated")) + updated: typing.Optional[datetime.datetime]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="updated", encoder=lambda d: datetime.datetime.isoformat(d) if d else None, decoder=lambda d:datetime.datetime.fromisoformat(d) if d else None, mm_field=fields.DateTime(format='iso'))) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsummary.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsummary.py index 33f7a3e..720a8d1 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsummary.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemsummary.py @@ -24,7 +24,7 @@ class FeedItemSummary: value: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="value")) type: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="type")) language: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="language")) - base: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="base")) + base: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="base")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemtitle.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemtitle.py index 01deae6..23cf611 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemtitle.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/feeditemtitle.py @@ -24,7 +24,7 @@ class FeedItemTitle: value: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="value")) type: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="type")) language: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="language")) - base: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="base")) + base: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="base")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/link.py b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/link.py index 6f1dbda..a414f38 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/link.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/src/rssbridge_producer_data/microsoft/opendata/rssfeeds/link.py @@ -24,7 +24,7 @@ class Link: rel: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="rel")) href: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="href")) type: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="type")) - title: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="title")) + title: typing.Optional[str]=dataclasses.field(kw_only=True, metadata=dataclasses_json.config(field_name="title")) def __post_init__(self): diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditem.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditem.py index 9c60031..27e1cfe 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditem.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditem.py @@ -9,15 +9,16 @@ sys.path.append(os.path.realpath(os.path.join(os.path.dirname(__file__), '../src'.replace('/', os.sep)))) from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditem import FeedItem -from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsummary import Test_FeedItemSummary -from test_datetime import Test_datetime -from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemenclosure import Test_FeedItemEnclosure from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsource import Test_FeedItemSource +from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsummary import Test_FeedItemSummary from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemauthor import Test_FeedItemAuthor -from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditempublisher import Test_FeedItemPublisher from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemcontent import Test_FeedItemContent -from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemtitle import Test_FeedItemTitle +from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditempublisher import Test_FeedItemPublisher from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_link import Test_Link +from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemtitle import Test_FeedItemTitle +from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemenclosure import Test_FeedItemEnclosure +import datetime + class Test_FeedItem(unittest.TestCase): """ @@ -41,17 +42,17 @@ def create_instance(): summary=Test_FeedItemSummary.create_instance(), title=Test_FeedItemTitle.create_instance(), source=Test_FeedItemSource.create_instance(), - content=[Test_FeedItemContent.create_instance()], - enclosures=[Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance()], - published=datetime.datetime.now(), - updated=datetime.datetime.now(), - created=datetime.datetime.now(), - expired=datetime.datetime.now(), - id='glqavnshvkebuswvdjvj', - license='cgolawsmqkffvaceqdwd', - comments='skeocovegojbcdomvoga', - contributors=[Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()], - links=[Test_Link.create_instance()] + content=[Test_FeedItemContent.create_instance(), Test_FeedItemContent.create_instance(), Test_FeedItemContent.create_instance()], + enclosures=[Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance()], + published=datetime.datetime.now(datetime.timezone.utc), + updated=datetime.datetime.now(datetime.timezone.utc), + created=datetime.datetime.now(datetime.timezone.utc), + expired=datetime.datetime.now(datetime.timezone.utc), + id='dgcoivnoxrdqljakbmxf', + license='sokifbvazmblvrhhtcnf', + comments='fkafjdzqqmchuxihefbd', + contributors=[Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()], + links=[Test_Link.create_instance(), Test_Link.create_instance(), Test_Link.create_instance()] ) return instance @@ -100,7 +101,7 @@ def test_content_property(self): """ Test content property """ - test_value = [Test_FeedItemContent.create_instance()] + test_value = [Test_FeedItemContent.create_instance(), Test_FeedItemContent.create_instance(), Test_FeedItemContent.create_instance()] self.instance.content = test_value self.assertEqual(self.instance.content, test_value) @@ -108,7 +109,7 @@ def test_enclosures_property(self): """ Test enclosures property """ - test_value = [Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance()] + test_value = [Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance(), Test_FeedItemEnclosure.create_instance()] self.instance.enclosures = test_value self.assertEqual(self.instance.enclosures, test_value) @@ -116,7 +117,7 @@ def test_published_property(self): """ Test published property """ - test_value = datetime.datetime.now() + test_value = datetime.datetime.now(datetime.timezone.utc) self.instance.published = test_value self.assertEqual(self.instance.published, test_value) @@ -124,7 +125,7 @@ def test_updated_property(self): """ Test updated property """ - test_value = datetime.datetime.now() + test_value = datetime.datetime.now(datetime.timezone.utc) self.instance.updated = test_value self.assertEqual(self.instance.updated, test_value) @@ -132,7 +133,7 @@ def test_created_property(self): """ Test created property """ - test_value = datetime.datetime.now() + test_value = datetime.datetime.now(datetime.timezone.utc) self.instance.created = test_value self.assertEqual(self.instance.created, test_value) @@ -140,7 +141,7 @@ def test_expired_property(self): """ Test expired property """ - test_value = datetime.datetime.now() + test_value = datetime.datetime.now(datetime.timezone.utc) self.instance.expired = test_value self.assertEqual(self.instance.expired, test_value) @@ -148,7 +149,7 @@ def test_id_property(self): """ Test id property """ - test_value = 'glqavnshvkebuswvdjvj' + test_value = 'dgcoivnoxrdqljakbmxf' self.instance.id = test_value self.assertEqual(self.instance.id, test_value) @@ -156,7 +157,7 @@ def test_license_property(self): """ Test license property """ - test_value = 'cgolawsmqkffvaceqdwd' + test_value = 'sokifbvazmblvrhhtcnf' self.instance.license = test_value self.assertEqual(self.instance.license, test_value) @@ -164,7 +165,7 @@ def test_comments_property(self): """ Test comments property """ - test_value = 'skeocovegojbcdomvoga' + test_value = 'fkafjdzqqmchuxihefbd' self.instance.comments = test_value self.assertEqual(self.instance.comments, test_value) @@ -172,7 +173,7 @@ def test_contributors_property(self): """ Test contributors property """ - test_value = [Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()] + test_value = [Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()] self.instance.contributors = test_value self.assertEqual(self.instance.contributors, test_value) @@ -180,7 +181,7 @@ def test_links_property(self): """ Test links property """ - test_value = [Test_Link.create_instance()] + test_value = [Test_Link.create_instance(), Test_Link.create_instance(), Test_Link.create_instance()] self.instance.links = test_value self.assertEqual(self.instance.links, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemauthor.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemauthor.py index 6a14d57..af8ef79 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemauthor.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemauthor.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemauthor import FeedItemAuthor + class Test_FeedItemAuthor(unittest.TestCase): """ Test case for FeedItemAuthor @@ -27,9 +28,9 @@ def create_instance(): Create instance of FeedItemAuthor for testing """ instance = FeedItemAuthor( - name='qxkwmtxpweugxgnfyted', - href='klymmawdlluztpshtfbb', - email='nafyskrliigzmvjjghiq' + name='zdfdnauscibexxepypvp', + href='ursekwffvotzzeswloqh', + email='ganwwoswcpfhmjbzgaxf' ) return instance @@ -38,7 +39,7 @@ def test_name_property(self): """ Test name property """ - test_value = 'qxkwmtxpweugxgnfyted' + test_value = 'zdfdnauscibexxepypvp' self.instance.name = test_value self.assertEqual(self.instance.name, test_value) @@ -46,7 +47,7 @@ def test_href_property(self): """ Test href property """ - test_value = 'klymmawdlluztpshtfbb' + test_value = 'ursekwffvotzzeswloqh' self.instance.href = test_value self.assertEqual(self.instance.href, test_value) @@ -54,7 +55,7 @@ def test_email_property(self): """ Test email property """ - test_value = 'nafyskrliigzmvjjghiq' + test_value = 'ganwwoswcpfhmjbzgaxf' self.instance.email = test_value self.assertEqual(self.instance.email, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemcontent.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemcontent.py index 5479c0e..cc566ba 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemcontent.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemcontent.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemcontent import FeedItemContent + class Test_FeedItemContent(unittest.TestCase): """ Test case for FeedItemContent @@ -27,10 +28,10 @@ def create_instance(): Create instance of FeedItemContent for testing """ instance = FeedItemContent( - value='vwpqtbfesuldeianondj', - type='umrijkptlzojwhbaoncu', - language='ulngcyqapuvknbsredbu', - base='qxprfgvubtyhbevrrhac' + value='fsmnurmwbkrikwyfjgwe', + type='khdcjqskyqdegaqrtzmn', + language='omdjbpdgianjpwkukfoj', + base='rjbjayvuofdtqmooeuke' ) return instance @@ -39,7 +40,7 @@ def test_value_property(self): """ Test value property """ - test_value = 'vwpqtbfesuldeianondj' + test_value = 'fsmnurmwbkrikwyfjgwe' self.instance.value = test_value self.assertEqual(self.instance.value, test_value) @@ -47,7 +48,7 @@ def test_type_property(self): """ Test type property """ - test_value = 'umrijkptlzojwhbaoncu' + test_value = 'khdcjqskyqdegaqrtzmn' self.instance.type = test_value self.assertEqual(self.instance.type, test_value) @@ -55,7 +56,7 @@ def test_language_property(self): """ Test language property """ - test_value = 'ulngcyqapuvknbsredbu' + test_value = 'omdjbpdgianjpwkukfoj' self.instance.language = test_value self.assertEqual(self.instance.language, test_value) @@ -63,7 +64,7 @@ def test_base_property(self): """ Test base property """ - test_value = 'qxprfgvubtyhbevrrhac' + test_value = 'rjbjayvuofdtqmooeuke' self.instance.base = test_value self.assertEqual(self.instance.base, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemenclosure.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemenclosure.py index 2576cf2..be2537f 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemenclosure.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemenclosure.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemenclosure import FeedItemEnclosure + class Test_FeedItemEnclosure(unittest.TestCase): """ Test case for FeedItemEnclosure @@ -27,9 +28,9 @@ def create_instance(): Create instance of FeedItemEnclosure for testing """ instance = FeedItemEnclosure( - href='vytearzegzmpedqwmlxo', - length=int(98), - type='gdypsigsrramvjcaixdh' + href='svctgxfdbayofxslirot', + length=int(44), + type='vfbgalfdqyixvffplanc' ) return instance @@ -38,7 +39,7 @@ def test_href_property(self): """ Test href property """ - test_value = 'vytearzegzmpedqwmlxo' + test_value = 'svctgxfdbayofxslirot' self.instance.href = test_value self.assertEqual(self.instance.href, test_value) @@ -46,7 +47,7 @@ def test_length_property(self): """ Test length property """ - test_value = int(98) + test_value = int(44) self.instance.length = test_value self.assertEqual(self.instance.length, test_value) @@ -54,7 +55,7 @@ def test_type_property(self): """ Test type property """ - test_value = 'gdypsigsrramvjcaixdh' + test_value = 'vfbgalfdqyixvffplanc' self.instance.type = test_value self.assertEqual(self.instance.type, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditempublisher.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditempublisher.py index 13dd394..985a405 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditempublisher.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditempublisher.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditempublisher import FeedItemPublisher + class Test_FeedItemPublisher(unittest.TestCase): """ Test case for FeedItemPublisher @@ -27,9 +28,9 @@ def create_instance(): Create instance of FeedItemPublisher for testing """ instance = FeedItemPublisher( - name='xvezhljxgksvarttvfvk', - href='vmkyrmesbmvzhsrkheno', - email='rczbsgteymunvlviuhen' + name='gnrjlaapyiclmexioyjx', + href='uetjqvwcblypurwseknq', + email='pvpxbzjxaomigrhayxjh' ) return instance @@ -38,7 +39,7 @@ def test_name_property(self): """ Test name property """ - test_value = 'xvezhljxgksvarttvfvk' + test_value = 'gnrjlaapyiclmexioyjx' self.instance.name = test_value self.assertEqual(self.instance.name, test_value) @@ -46,7 +47,7 @@ def test_href_property(self): """ Test href property """ - test_value = 'vmkyrmesbmvzhsrkheno' + test_value = 'uetjqvwcblypurwseknq' self.instance.href = test_value self.assertEqual(self.instance.href, test_value) @@ -54,7 +55,7 @@ def test_email_property(self): """ Test email property """ - test_value = 'rczbsgteymunvlviuhen' + test_value = 'pvpxbzjxaomigrhayxjh' self.instance.email = test_value self.assertEqual(self.instance.email, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsource.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsource.py index 0a62854..f5564d9 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsource.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsource.py @@ -10,8 +10,9 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsource import FeedItemSource from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_link import Test_Link -from test_datetime import Test_datetime from test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemauthor import Test_FeedItemAuthor +import datetime + class Test_FeedItemSource(unittest.TestCase): """ @@ -30,18 +31,18 @@ def create_instance(): Create instance of FeedItemSource for testing """ instance = FeedItemSource( - author='nnrusfqxsfqtbdavkifx', + author='vctfyrneikqhvsoqkyez', author_detail=Test_FeedItemAuthor.create_instance(), - contributors=[Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()], - icon='ofvbnypnyetcpydxmdhv', - id='abubguacuwmmaxhkqtix', - link='kpxaxoauwfmdrljonxdc', + contributors=[Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()], + icon='sxijaztpjtgbrvkgxinw', + id='hxtmcwaovjvhopqczcpj', + link='zvbyhzplkjclfrgndslh', links=[Test_Link.create_instance()], - logo='mfjayeoqsitxgtbiyihv', - rights='rqjwbilvcirgohncybsd', - subtitle='qzidwidnfiofoefeihnh', - title='mabsmtrolbtlhlyxdihn', - updated=datetime.datetime.now() + logo='lfbqspuigoohjsbsyijt', + rights='psdjmdfouuhctsxttmim', + subtitle='zxsyerbyfgmyrwkwlbti', + title='cigctirmqghebgcdykns', + updated=datetime.datetime.now(datetime.timezone.utc) ) return instance @@ -50,7 +51,7 @@ def test_author_property(self): """ Test author property """ - test_value = 'nnrusfqxsfqtbdavkifx' + test_value = 'vctfyrneikqhvsoqkyez' self.instance.author = test_value self.assertEqual(self.instance.author, test_value) @@ -66,7 +67,7 @@ def test_contributors_property(self): """ Test contributors property """ - test_value = [Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()] + test_value = [Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance(), Test_FeedItemAuthor.create_instance()] self.instance.contributors = test_value self.assertEqual(self.instance.contributors, test_value) @@ -74,7 +75,7 @@ def test_icon_property(self): """ Test icon property """ - test_value = 'ofvbnypnyetcpydxmdhv' + test_value = 'sxijaztpjtgbrvkgxinw' self.instance.icon = test_value self.assertEqual(self.instance.icon, test_value) @@ -82,7 +83,7 @@ def test_id_property(self): """ Test id property """ - test_value = 'abubguacuwmmaxhkqtix' + test_value = 'hxtmcwaovjvhopqczcpj' self.instance.id = test_value self.assertEqual(self.instance.id, test_value) @@ -90,7 +91,7 @@ def test_link_property(self): """ Test link property """ - test_value = 'kpxaxoauwfmdrljonxdc' + test_value = 'zvbyhzplkjclfrgndslh' self.instance.link = test_value self.assertEqual(self.instance.link, test_value) @@ -106,7 +107,7 @@ def test_logo_property(self): """ Test logo property """ - test_value = 'mfjayeoqsitxgtbiyihv' + test_value = 'lfbqspuigoohjsbsyijt' self.instance.logo = test_value self.assertEqual(self.instance.logo, test_value) @@ -114,7 +115,7 @@ def test_rights_property(self): """ Test rights property """ - test_value = 'rqjwbilvcirgohncybsd' + test_value = 'psdjmdfouuhctsxttmim' self.instance.rights = test_value self.assertEqual(self.instance.rights, test_value) @@ -122,7 +123,7 @@ def test_subtitle_property(self): """ Test subtitle property """ - test_value = 'qzidwidnfiofoefeihnh' + test_value = 'zxsyerbyfgmyrwkwlbti' self.instance.subtitle = test_value self.assertEqual(self.instance.subtitle, test_value) @@ -130,7 +131,7 @@ def test_title_property(self): """ Test title property """ - test_value = 'mabsmtrolbtlhlyxdihn' + test_value = 'cigctirmqghebgcdykns' self.instance.title = test_value self.assertEqual(self.instance.title, test_value) @@ -138,7 +139,7 @@ def test_updated_property(self): """ Test updated property """ - test_value = datetime.datetime.now() + test_value = datetime.datetime.now(datetime.timezone.utc) self.instance.updated = test_value self.assertEqual(self.instance.updated, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsummary.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsummary.py index 4b5b78f..53a1267 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsummary.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemsummary.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemsummary import FeedItemSummary + class Test_FeedItemSummary(unittest.TestCase): """ Test case for FeedItemSummary @@ -27,10 +28,10 @@ def create_instance(): Create instance of FeedItemSummary for testing """ instance = FeedItemSummary( - value='vseahgrhkjmpwbcjyoxm', - type='itecrmfwdtoixjpshesk', - language='oglgsukjuimnuecpgjem', - base='yahmmjehyljaqcnqaxhk' + value='tgbqwuiexxphvyylmkqv', + type='xxxithktctdakdmwqlam', + language='opakqicxsvvnidniivhn', + base='obudicyinijpitrksmbr' ) return instance @@ -39,7 +40,7 @@ def test_value_property(self): """ Test value property """ - test_value = 'vseahgrhkjmpwbcjyoxm' + test_value = 'tgbqwuiexxphvyylmkqv' self.instance.value = test_value self.assertEqual(self.instance.value, test_value) @@ -47,7 +48,7 @@ def test_type_property(self): """ Test type property """ - test_value = 'itecrmfwdtoixjpshesk' + test_value = 'xxxithktctdakdmwqlam' self.instance.type = test_value self.assertEqual(self.instance.type, test_value) @@ -55,7 +56,7 @@ def test_language_property(self): """ Test language property """ - test_value = 'oglgsukjuimnuecpgjem' + test_value = 'opakqicxsvvnidniivhn' self.instance.language = test_value self.assertEqual(self.instance.language, test_value) @@ -63,7 +64,7 @@ def test_base_property(self): """ Test base property """ - test_value = 'yahmmjehyljaqcnqaxhk' + test_value = 'obudicyinijpitrksmbr' self.instance.base = test_value self.assertEqual(self.instance.base, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemtitle.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemtitle.py index 3545638..1f5cfbb 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemtitle.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_feeditemtitle.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.feeditemtitle import FeedItemTitle + class Test_FeedItemTitle(unittest.TestCase): """ Test case for FeedItemTitle @@ -27,10 +28,10 @@ def create_instance(): Create instance of FeedItemTitle for testing """ instance = FeedItemTitle( - value='gdhvpcqydnimrwbpznxy', - type='rwpdbahvrqhhmatxedlu', - language='yoiyooqwimvwkbuydevs', - base='hekgdxxrwlsijnhdkrvp' + value='oqtvgrnuyinjxakrsjdy', + type='dugyxpcmkuvwbspdntlb', + language='wfbpuxnsizdqmwmztvgy', + base='zabzlzfwawuvxbnwimfk' ) return instance @@ -39,7 +40,7 @@ def test_value_property(self): """ Test value property """ - test_value = 'gdhvpcqydnimrwbpznxy' + test_value = 'oqtvgrnuyinjxakrsjdy' self.instance.value = test_value self.assertEqual(self.instance.value, test_value) @@ -47,7 +48,7 @@ def test_type_property(self): """ Test type property """ - test_value = 'rwpdbahvrqhhmatxedlu' + test_value = 'dugyxpcmkuvwbspdntlb' self.instance.type = test_value self.assertEqual(self.instance.type, test_value) @@ -55,7 +56,7 @@ def test_language_property(self): """ Test language property """ - test_value = 'yoiyooqwimvwkbuydevs' + test_value = 'wfbpuxnsizdqmwmztvgy' self.instance.language = test_value self.assertEqual(self.instance.language, test_value) @@ -63,7 +64,7 @@ def test_base_property(self): """ Test base property """ - test_value = 'hekgdxxrwlsijnhdkrvp' + test_value = 'zabzlzfwawuvxbnwimfk' self.instance.base = test_value self.assertEqual(self.instance.base, test_value) diff --git a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_link.py b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_link.py index 16e2493..cffb1b5 100644 --- a/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_link.py +++ b/rss/rssbridge_producer/rssbridge_producer_data/tests/test_rssbridge_producer_data_microsoft_opendata_rssfeeds_link.py @@ -10,6 +10,7 @@ from rssbridge_producer_data.microsoft.opendata.rssfeeds.link import Link + class Test_Link(unittest.TestCase): """ Test case for Link @@ -27,10 +28,10 @@ def create_instance(): Create instance of Link for testing """ instance = Link( - rel='wdqmqyoebwezhlxstltr', - href='scbluwfqflxgcmmlzjkq', - type='xqewyajxyxszvriiagdx', - title='mlxzdpayqdfnhgzavssf' + rel='xbqlsxrztszwvcugktgv', + href='ovpjeeseofklydrgtpdy', + type='ypzmznjwjoeuyocdcdew', + title='rdmmulapkuollvuszhjg' ) return instance @@ -39,7 +40,7 @@ def test_rel_property(self): """ Test rel property """ - test_value = 'wdqmqyoebwezhlxstltr' + test_value = 'xbqlsxrztszwvcugktgv' self.instance.rel = test_value self.assertEqual(self.instance.rel, test_value) @@ -47,7 +48,7 @@ def test_href_property(self): """ Test href property """ - test_value = 'scbluwfqflxgcmmlzjkq' + test_value = 'ovpjeeseofklydrgtpdy' self.instance.href = test_value self.assertEqual(self.instance.href, test_value) @@ -55,7 +56,7 @@ def test_type_property(self): """ Test type property """ - test_value = 'xqewyajxyxszvriiagdx' + test_value = 'ypzmznjwjoeuyocdcdew' self.instance.type = test_value self.assertEqual(self.instance.type, test_value) @@ -63,7 +64,7 @@ def test_title_property(self): """ Test title property """ - test_value = 'mlxzdpayqdfnhgzavssf' + test_value = 'rdmmulapkuollvuszhjg' self.instance.title = test_value self.assertEqual(self.instance.title, test_value)