Changeset - 16389bb32f39
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 6 years ago 2020-05-10 20:50:46
mads@kiilerich.com
Grafted from: 95b82f6c7f5a
tests: coverage of Git repo feeds

Coverage of the case reported in Issue #372.
1 file changed with 12 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/functional/test_feed.py
Show inline comments
 
@@ -3,18 +3,26 @@ from kallithea.tests import base
 

	
 
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
0 comments (0 inline, 0 general)