~ubuntu-branches/ubuntu/vivid/mago/vivid

« back to all changes in this revision

Viewing changes to gcalctool/gcalctool_views.py

  • Committer: Bazaar Package Importer
  • Author(s): Ara Pulido
  • Date: 2010-04-14 14:05:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100414140534-grv0bwv9wv97khir
Tags: 0.2-0ubuntu1
* Mago tests updated for Lucid
  + Fixes arguments handling (LP: #562965)
  + Fixes seahorse tests (LP: #552618)
  + Fixes ubuntu-menu tests (LP: #551492)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
from mago.test_suite.gnome 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()