diff --git a/rhodecode/tests/functional/test_feed.py b/rhodecode/tests/functional/test_feed.py --- a/rhodecode/tests/functional/test_feed.py +++ b/rhodecode/tests/functional/test_feed.py @@ -6,10 +6,17 @@ class TestFeedController(TestController) self.log_user() response = self.app.get(url(controller='feed', action='rss', repo_name=HG_REPO)) - # Test response... + + + + assert response.content_type == "application/rss+xml" + assert """""" in response def test_atom(self): self.log_user() response = self.app.get(url(controller='feed', action='atom', repo_name=HG_REPO)) - # Test response... \ No newline at end of file + + assert response.content_type == """application/atom+xml""" + assert """""" in response + assert """""" in response diff --git a/rhodecode/tests/functional/test_files.py b/rhodecode/tests/functional/test_files.py --- a/rhodecode/tests/functional/test_files.py +++ b/rhodecode/tests/functional/test_files.py @@ -246,9 +246,9 @@ removed extra unicode conversion in diff repo_name=HG_REPO, revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc', f_path='vcs/nodes.py')) - #print response.body() - #assert False - #TODO: put in more + + assert response.content_disposition == "attachment; filename=nodes.py" + assert response.content_type == "text/x-python" def test_raw_file_wrong_cs(self): self.log_user() @@ -258,7 +258,7 @@ removed extra unicode conversion in diff response = self.app.get(url(controller='files', action='rawfile', repo_name=HG_REPO, revision=rev, - f_path='vcs/nodes.py')) + f_path=f_path)) assert """Revision %r does not exist for this repository""" % (rev) in response.session['flash'][0][1], 'No flash message' assert """%s""" % (HG_REPO) in response.session['flash'][0][1], 'No flash message' @@ -276,7 +276,7 @@ removed extra unicode conversion in diff assert "There is no file nor directory at the given path: %r at revision %r" % (f_path, rev[:12]) in response.session['flash'][0][1], 'No flash message' #========================================================================== - # RAW + # RAW RESPONSE - PLAIN #========================================================================== def test_raw_ok(self): self.log_user() @@ -284,8 +284,8 @@ removed extra unicode conversion in diff repo_name=HG_REPO, revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc', f_path='vcs/nodes.py')) - #assert False - #TODO: put in more + + assert response.content_type == "text/plain" def test_raw_wrong_cs(self): self.log_user() @@ -295,9 +295,8 @@ removed extra unicode conversion in diff response = self.app.get(url(controller='files', action='raw', repo_name=HG_REPO, revision=rev, - f_path='vcs/nodes.py')) + f_path=f_path)) - print response.session['flash'][0][1] assert """Revision %r does not exist for this repository""" % (rev) in response.session['flash'][0][1], 'No flash message' assert """%s""" % (HG_REPO) in response.session['flash'][0][1], 'No flash message'