Show More
@@ -6,10 +6,17 b' class TestFeedController(TestController)' | |||
|
6 | 6 | self.log_user() |
|
7 | 7 | response = self.app.get(url(controller='feed', action='rss', |
|
8 | 8 | repo_name=HG_REPO)) |
|
9 | # Test response... | |
|
9 | ||
|
10 | ||
|
11 | ||
|
12 | assert response.content_type == "application/rss+xml" | |
|
13 | assert """<rss version="2.0">""" in response | |
|
10 | 14 | |
|
11 | 15 | def test_atom(self): |
|
12 | 16 | self.log_user() |
|
13 | 17 | response = self.app.get(url(controller='feed', action='atom', |
|
14 | 18 | repo_name=HG_REPO)) |
|
15 | # Test response... No newline at end of file | |
|
19 | ||
|
20 | assert response.content_type == """application/atom+xml""" | |
|
21 | assert """<?xml version="1.0" encoding="utf-8"?>""" in response | |
|
22 | assert """<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us">""" in response |
@@ -246,9 +246,9 b' removed extra unicode conversion in diff' | |||
|
246 | 246 | repo_name=HG_REPO, |
|
247 | 247 | revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc', |
|
248 | 248 | f_path='vcs/nodes.py')) |
|
249 | #print response.body() | |
|
250 | #assert False | |
|
251 | #TODO: put in more | |
|
249 | ||
|
250 | assert response.content_disposition == "attachment; filename=nodes.py" | |
|
251 | assert response.content_type == "text/x-python" | |
|
252 | 252 | |
|
253 | 253 | def test_raw_file_wrong_cs(self): |
|
254 | 254 | self.log_user() |
@@ -258,7 +258,7 b' removed extra unicode conversion in diff' | |||
|
258 | 258 | response = self.app.get(url(controller='files', action='rawfile', |
|
259 | 259 | repo_name=HG_REPO, |
|
260 | 260 | revision=rev, |
|
261 |
f_path= |
|
|
261 | f_path=f_path)) | |
|
262 | 262 | |
|
263 | 263 | assert """Revision %r does not exist for this repository""" % (rev) in response.session['flash'][0][1], 'No flash message' |
|
264 | 264 | assert """%s""" % (HG_REPO) in response.session['flash'][0][1], 'No flash message' |
@@ -276,7 +276,7 b' removed extra unicode conversion in diff' | |||
|
276 | 276 | 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' |
|
277 | 277 | |
|
278 | 278 | #========================================================================== |
|
279 | # RAW | |
|
279 | # RAW RESPONSE - PLAIN | |
|
280 | 280 | #========================================================================== |
|
281 | 281 | def test_raw_ok(self): |
|
282 | 282 | self.log_user() |
@@ -284,8 +284,8 b' removed extra unicode conversion in diff' | |||
|
284 | 284 | repo_name=HG_REPO, |
|
285 | 285 | revision='27cd5cce30c96924232dffcd24178a07ffeb5dfc', |
|
286 | 286 | f_path='vcs/nodes.py')) |
|
287 | #assert False | |
|
288 | #TODO: put in more | |
|
287 | ||
|
288 | assert response.content_type == "text/plain" | |
|
289 | 289 | |
|
290 | 290 | def test_raw_wrong_cs(self): |
|
291 | 291 | self.log_user() |
@@ -295,9 +295,8 b' removed extra unicode conversion in diff' | |||
|
295 | 295 | response = self.app.get(url(controller='files', action='raw', |
|
296 | 296 | repo_name=HG_REPO, |
|
297 | 297 | revision=rev, |
|
298 |
f_path= |
|
|
298 | f_path=f_path)) | |
|
299 | 299 | |
|
300 | print response.session['flash'][0][1] | |
|
301 | 300 | assert """Revision %r does not exist for this repository""" % (rev) in response.session['flash'][0][1], 'No flash message' |
|
302 | 301 | assert """%s""" % (HG_REPO) in response.session['flash'][0][1], 'No flash message' |
|
303 | 302 |
General Comments 0
You need to be logged in to leave comments.
Login now