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

« back to all changes in this revision

Viewing changes to mago/test_suite/gcalc.py

  • Committer: Bazaar Package Importer
  • Author(s): Ara Pulido
  • Date: 2010-10-18 16:08:42 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101018160842-6euef3m6mqxjlcai
Tags: 0.3-0ubuntu1
* New upstream release:
  + Added i18n support
  + Tests working on Maverick 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""
 
2
This module contains the definition of the test suites used for GCalc testing
 
3
"""
 
4
import ldtp, ooldtp
 
5
from .main import SingleApplicationTestSuite
 
6
from ..application.gcalc import Application, Calculator
 
7
 
 
8
class GCalctoolTestSuite(SingleApplicationTestSuite):
 
9
    """
 
10
    Default test suite for Calculator
 
11
    """
 
12
    APPLICATION_FACTORY = Calculator
 
13
    def setup(self):
 
14
        self.application.open()
 
15
        self.application.set_view("BASIC")
 
16
        self.application.push("C")
 
17
 
 
18
    def teardown(self):
 
19
        self.application.set_name(self.application.WINDOW)
 
20
        if self.application.is_opened(): 
 
21
            self.application.close()
 
22
    
 
23
    def cleanup(self):
 
24
        pass
 
25
 
 
26
class GCalctoolViewTestSuite(GCalctoolTestSuite):
 
27
    """
 
28
    Test suite for views populates the screen with some data in setup
 
29
    """
 
30
    def setup(self):
 
31
        GCalctoolTestSuite.setup(self)
 
32
        self.application.push("13.37")