~ubuntu-branches/ubuntu/saucy/mago/saucy

« back to all changes in this revision

Viewing changes to gcalctool/gcalctool_views.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-02-08 13:32:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110208133213-m1og7ey0m990chg6
Tags: 0.3+bzr20-0ubuntu1
* debian/rules:
  - updated to debhelper 7
  - use dh_python2 instead of python-central
* debian/pycompat:
  - removed, no longer needed
* debian/control:
  - dropped cdbs and python-central dependencies
* bzr snapshot of the current trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
from mago.test_suite.gcalc import GCalctoolViewTestSuite
3
 
 
4
 
class GCalctoolViews(GCalctoolViewTestSuite):
5
 
    def changeViews(self, view, state, button):
6
 
        value = self.application.get_value()
7
 
        self.application.set_view(view)
8
 
        if value != self.application.get_value():
9
 
            raise AssertionError, "Displayed value changed upon changing views"
10
 
        if state == "showing":
11
 
            if self.application.showing(button) == False:
12
 
                raise AssertionError, "Expected button is not showing"
13
 
        elif state == "hidden":
14
 
            if self.application.showing(button) == True:
15
 
                raise AssertionError, "Button is not hidden as expected"
16
 
        
17
 
if __name__ == "__main__":
18
 
    gcalctool_views_test = GCalctoolViews()
19
 
    gcalctool_views_test.run()