aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-16 07:42:31 +0000
committerSam James <sam@gentoo.org>2023-02-18 10:13:35 +0000
commitebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f (patch)
tree9fd363305f28c91ca3e45fa75de7d6bbba9ced61
parenttests: news: mention GLEP 42 explicitly (diff)
downloadportage-ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f.tar.gz
portage-ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f.tar.bz2
portage-ebf78db6d9bb72f5ca6538ad5cc94ec297f9aa2f.zip
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@gentoo.org>
-rw-r--r--lib/portage/tests/news/test_NewsItem.py7
1 files changed, 7 insertions, 0 deletions
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]})