Child: [dee47a] (diff)

Download this file

test_root.py    27 lines (22 with data), 873 Bytes

 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
from nose.tools import assert_true, assert_false
from forgetracker.tests import TestController
from pyforge import model
class TestFunctionalController(TestController):
def test_new_ticket(self):
response = self.app.get('/bugs/new/')
form = response.form
summary = 'first sample ticket'
form['summary'] = summary
response = form.submit().follow()
assert_true(summary in response)
response = self.app.get('/bugs/')
assert_true(summary in response)
def test_two_trackers(self):
response = self.app.get('/doc_bugs/new/')
form = response.form
summary = 'first sample doc_bug'
form['summary'] = summary
response = form.submit().follow()
assert_true(summary in response)
response = self.app.get('/bugs/')
assert_false(summary in response)