changeset 8426:16389bb32f39 stable

tests: coverage of Git repo feeds Coverage of the case reported in Issue #372.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 10 May 2020 20:50:46 +0200
parents 79ce82bdb06e
children d59cb6068e55
files kallithea/tests/functional/test_feed.py
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/functional/test_feed.py	Sun May 10 20:04:17 2020 +0200
+++ b/kallithea/tests/functional/test_feed.py	Sun May 10 20:50:46 2020 +0200
@@ -3,18 +3,26 @@
 
 class TestFeedController(base.TestController):
 
-    def test_rss(self):
+    @base.parametrize('repo', [
+        base.HG_REPO,
+        base.GIT_REPO,
+    ])
+    def test_rss(self, repo):
         self.log_user()
         response = self.app.get(base.url(controller='feed', action='rss',
-                                    repo_name=base.HG_REPO))
+                                    repo_name=repo))
 
         assert response.content_type == "application/rss+xml"
         assert """<rss version="2.0">""" in response
 
-    def test_atom(self):
+    @base.parametrize('repo', [
+        base.HG_REPO,
+        base.GIT_REPO,
+    ])
+    def test_atom(self, repo):
         self.log_user()
         response = self.app.get(base.url(controller='feed', action='atom',
-                                    repo_name=base.HG_REPO))
+                                    repo_name=repo))
 
         assert response.content_type == """application/atom+xml"""
         assert """<?xml version="1.0" encoding="utf-8"?>""" in response