source: WAeUP_SRP/trunk/ftest/test_waeup.py @ 3778

Last change on this file since 3778 was 266, checked in by lregebro, 19 years ago

Adding funkload example.

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1# (C) Copyright 2005 Nuxeo SAS <http://nuxeo.com>
2# Author: bdelbosc@nuxeo.com
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License version 2 as published
6# by the Free Software Foundation.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16# 02111-1307, USA.
17#
18"""Simple funkload zope tests
19
20$Id: test_waeup.py 266 2006-06-23 10:54:43Z lregebro $
21"""
22import unittest
23from random import random
24from funkload.ZopeTestCase import ZopeTestCase
25from funkload.Lipsum import Lipsum
26
27
28class Zope(ZopeTestCase):
29    """Testing the funkload ZopeTestCase
30
31    This test use a configuration file Zope.conf.
32    """
33    def setUp(self):
34        """Setting up test."""
35        self.logd("setUp.")
36        self.zope_url = self.conf_get('main', 'url')
37        self.admin_id = self.conf_get('main', 'admin_id')
38        self.admin_pwd = self.conf_get('main', 'admin_pwd')
39
40    def tearDown(self):
41        """Setting up test."""
42        self.logd("tearDown.")
43
44    def test_admission(self):
45        server_url = self.zope_url
46       
47        self.get("%s/" % server_url)
48        self.get("%s/students/check_admission" % server_url)
49        self.post("%s/students/check_admission" % server_url,
50                  params={'widget__sc_pin': '12345678',
51                          'widget__jamb_id': '12345678lr',
52                          'cpsdocument_edit_button': 'check'})
53        self.assert_('Your Admission Slip' in self.getBody())
54
55if __name__ in ('main', '__main__'):
56    unittest.main()
Note: See TracBrowser for help on using the repository browser.