~ubuntu-branches/ubuntu/raring/schooltool.intervention/raring

« back to all changes in this revision

Viewing changes to src/schooltool/intervention/browser/no_current_term.txt

  • Committer: Gediminas Paulauskas
  • Date: 2011-09-19 16:56:45 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: menesis@pov.lt-20110919165645-718diuud5tc4mjsx
Tags: 0.5.0-0ubuntu1
* New upstream release.
* debian/rules: move gradebook to Suggests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
===============
2
 
No Current Term
3
 
===============
4
 
 
5
 
If a schooltool operation relies on there being at least one term set up, and
6
 
the administator has not gotten around to doing that, we need to fail
7
 
gracefully.  That means giving the user an error message rather than crashing.
8
 
 
9
 
Let's log in as manager and create a student.
10
 
 
11
 
    >>> from schooltool.basicperson.browser.ftests import setup
12
 
    >>> manager = Browser('manager', 'schooltool')
13
 
    >>> setup.addPerson('Student', 'One', 'student1', 'pwd')
14
 
 
15
 
We'll navigate to the student and hit the Intervention Center button.  Since
16
 
there is no current schoolyear, we'll redirect to the no current term view.
17
 
 
18
 
    >>> manager.getLink('Manage').click()
19
 
    >>> manager.getLink('Persons').click()
20
 
    >>> manager.getLink('One').click()
21
 
    >>> manager.getLink('Intervention Center').click()
22
 
    >>> manager.url
23
 
    'http://localhost/no_current_term.html'
24