Child: [8e22fa] (diff)

Download this file

test_feeds.py    65 lines (54 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from pylons import g
from formencode.variabledecode import variable_encode
from ming.orm.ormsession import ThreadLocalORMSession
from allura.tests import TestController
from allura import model as M
class TestFeeds(TestController):
def setUp(self):
TestController.setUp(self)
self.app.get('/wiki/')
self.app.get('/bugs/')
r = self.app.post(
'/bugs/save_ticket',
params=variable_encode(dict(
ticket_form=dict(
ticket_num='',
tags='',
labels='',
assigned_to='',
milestone='',
summary='This is a ticket',
status='open',
description='This is a description'))),
status=302)
def test_project_feed(self):
self.app.get('/feed.rss')
self.app.get('/feed.atom')
def test_wiki_feed(self):
self.app.get('/wiki/feed.rss')
self.app.get('/wiki/feed.atom')
def test_wiki_page_feed(self):
self.app.get('/wiki/Root/update?title=Root&text=&tags=&tags_old=&labels=&labels_old=&viewable_by-0.id=all')
self.app.get('/wiki/Root/feed.rss')
self.app.get('/wiki/Root/feed.atom')
def test_ticket_list_feed(self):
self.app.get('/bugs/feed.rss')
self.app.get('/bugs/feed.atom')
def test_ticket_feed(self):
self.app.get('/bugs/1/feed.rss')
r = self.app.get('/bugs/1/feed.atom')
assert 'created' in r
self.app.post('/bugs/1/update_ticket', params=dict(
assigned_to='',
ticket_num='',
labels='',
labels_old='',
tags='',
tags_old='',
summary='This is a new ticket',
status='unread',
milestone='',
description='This is another description'))
r = self.app.get('/bugs/1/feed.atom')
assert '=>' in r
assert '<ins>' in r