public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/news/
Date: Sat, 18 Feb 2023 10:13:52 +0000 (UTC)	[thread overview]
Message-ID: <1676715215.ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f.sam@gentoo> (raw)

commit:     ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 07:42:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 10:13:35 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ebf78db6

tests: news: add trivial no-filter test

Add a basic test case for when no filter fields are used
(no Display-If-*).

Bug: https://bugs.gentoo.org/889330
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/tests/news/test_NewsItem.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/portage/tests/news/test_NewsItem.py b/lib/portage/tests/news/test_NewsItem.py
index e6f9a08b3..ba9fa0035 100644
--- a/lib/portage/tests/news/test_NewsItem.py
+++ b/lib/portage/tests/news/test_NewsItem.py
@@ -137,6 +137,13 @@ class NewsItemTestCase(TestCase):
 
         return FakeNewsItem(**news_args)
 
+    def testBasicNewsItem(self):
+        # Simple test with no filter fields (Display-If-*)
+        try:
+            item = self._processItem(str(self._createNewsItem()))
+        finally:
+            os.unlink(item.path)
+
     def testDisplayIfProfile(self):
         tmpItem = self._createNewsItem({"display_if_profile": [self.profile]})
 


             reply	other threads:[~2023-02-18 10:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18 10:13 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-18 10:13 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/news/ Sam James
2023-02-18 10:13 Sam James
2023-02-18 10:13 Sam James
2023-02-18 10:13 Sam James
2023-02-18 10:13 Sam James
2023-02-18 10:13 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1676715215.ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox