Esempio n. 1
0
 def setUp(self):
     TestController.setUp(self)
     c.user = M.User.by_username('test-admin')
     self.app.get('/discussion/')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'testforum'
     r.forms[1]['add_forum.name'] = 'Test Forum'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'testforum' in r
     self.email_address = c.user.email_addresses[0]
     h.set_context('test', 'discussion', neighborhood='Projects')
     self.forum = FM.Forum.query.get(shortname='testforum')
Esempio n. 2
0
 def setUp(self):
     TestController.setUp(self)
     c.user = M.User.by_username('test-admin')
     self.app.get('/discussion/')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'testforum'
     r.forms[1]['add_forum.name'] = 'Test Forum'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'testforum' in r
     self.email_address=c.user.email_addresses[0]
     h.set_context('test', 'discussion', neighborhood='Projects')
     self.forum = FM.Forum.query.get(shortname='testforum')
Esempio n. 3
0
 def setUp(self):
     TestController.setUp(self)
     self.app.get('/discussion/')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'testforum'
     r.forms[1]['add_forum.name'] = 'Test Forum'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'Test Forum' in r
     r.forms[1]['add_forum.shortname'] = 'test1'
     r.forms[1]['add_forum.name'] = 'Test Forum 1'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'Test Forum 1' in r
     h.set_context('test', 'discussion', neighborhood='Projects')
     self.user_id = M.User.query.get(username='******')._id
Esempio n. 4
0
 def setUp(self):
     TestController.setUp(self)
     self.app.get('/discussion/')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'testforum'
     r.forms[1]['add_forum.name'] = 'Test Forum'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'Test Forum' in r
     r.forms[1]['add_forum.shortname'] = 'test1'
     r.forms[1]['add_forum.name'] = 'Test Forum 1'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'Test Forum 1' in r
     h.set_context('test', 'discussion', neighborhood='Projects')
     self.user = M.User.query.get(username='******')
Esempio n. 5
0
 def setUp(self):
     TestController.setUp(self)
     self.app.get('/discussion/')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'testforum'
     r.forms[1]['add_forum.name'] = 'Test Forum'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'testforum' in r
     h.set_context('test', 'discussion', neighborhood='Projects')
     frm = FM.Forum.query.get(shortname='testforum')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'childforum'
     r.forms[1]['add_forum.name'] = 'Child Forum'
     r.forms[1]['add_forum.parent'] = str(frm._id)
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'childforum' in r
Esempio n. 6
0
 def setUp(self):
     TestController.setUp(self)
     self.app.get('/discussion/')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'testforum'
     r.forms[1]['add_forum.name'] = 'Test Forum'
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     frm = FM.Forum.query.get(shortname='testforum')
     assert 'testforum' in r
     h.set_context('test', 'discussion', neighborhood='Projects')
     frm = FM.Forum.query.get(shortname='testforum')
     r = self.app.get('/admin/discussion/forums')
     r.forms[1]['add_forum.shortname'] = 'childforum'
     r.forms[1]['add_forum.name'] = 'Child Forum'
     r.forms[1]['add_forum.parent'] = str(frm._id)
     r.forms[1].submit()
     r = self.app.get('/admin/discussion/forums')
     assert 'childforum' in r
 def setUp(self):
     TestController.setUp(self)
     self.setup_with_tools()
 def setUp(self):
     TestController.setUp(self)
     self.app.get('/discussion/')
Esempio n. 9
0
 def setUp(self):
     TestController.setUp(self)
     self.setup_with_tools()
Esempio n. 10
0
 def setUp(self):
     TestController.setUp(self)
     self.app.get('/discussion/')
Esempio n. 11
0
 def setUp(self):
     TestController.setUp(self)