Files @ e527cc2ce8dc
Branch filter:

Location: kallithea/kallithea/tests/functional/test_feed.py

Mads Kiilerich
cleanup: get rid of most "import *"

Apply script generated with the following hack:
(
hg loc '*.py'|xargs pyflakes-2 | sed -rn "s/([^:]*):.*'(.*)' may be undefined, or defined from star imports.*/sed -ri 's,\\\\<\2\\\\>([^=]|$),XXXX.\2\\\\1,g' \1/gp" | sort -u
hg loc '*.py'|xargs pyflakes-2 | sed -rn "s/([^:]*):.* undefined name '(.*)'$/sed -ri 's,\\\\<\2\\\\>([^=]|$),XXXX.\2\\\\1,g' \1/gp" | sort -u
hg loc '*.py'|xargs pyflakes-2 | sed -rn "s/([^:]*):.*'(from .*)\.([^.]*) import \*' used.*/sed -ri 's,\\\\<XXXX\\\\.,\3.,g' \1/gp" | sort -u
hg loc '*.py'|xargs pyflakes-2 | sed -rn "s/([^:]*):.*'(from .*)\.([^.]*) import \*' used.*/sed -ri 's,\2\\\\.\3 .*,\2 import \3,g' \1/gp" | sort -u
) | grep -v kallithea/bin/kallithea_cli_ishell.py > fix2.sh
from kallithea.tests import base


class TestFeedController(base.TestController):

    def test_rss(self):
        self.log_user()
        response = self.app.get(base.url(controller='feed', action='rss',
                                    repo_name=base.HG_REPO))

        assert response.content_type == "application/rss+xml"
        assert """<rss version="2.0">""" in response

    def test_atom(self):
        self.log_user()
        response = self.app.get(base.url(controller='feed', action='atom',
                                    repo_name=base.HG_REPO))

        assert response.content_type == """application/atom+xml"""
        assert """<?xml version="1.0" encoding="utf-8"?>""" in response
        assert """<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us">""" in response