~mvo/ubuntu-sso-client/strawman-lp711413

« back to all changes in this revision

Viewing changes to ubuntu_sso/tests/__init__.py

  • Committer: Tarmac
  • Author(s): natalia.bidart at canonical
  • Date: 2011-01-12 15:29:23 UTC
  • mfrom: (667.1.1 shutdown)
  • Revision ID: tarmac-20110112152923-xhd42r02kwe430sj
The service should shutdown when unused (LP: #701606).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
 
21
from twisted.trial import unittest
 
22
 
21
23
from ubuntu_sso.keyring import get_token_name
22
24
 
23
25
APP_NAME = 'The Super App!'
45
47
TOKEN_NAME = get_token_name(APP_NAME)
46
48
TC_URL = 'http://localhost/'
47
49
WINDOW_ID = 5
 
50
 
 
51
 
 
52
class TestCase(unittest.TestCase):
 
53
    """Customized test case that keeps tracks of method calls."""
 
54
 
 
55
    def setUp(self):
 
56
        super(TestCase, self).setUp()
 
57
        self._called = False
 
58
 
 
59
    def _set_called(self, *args, **kwargs):
 
60
        """Keep track of a method call."""
 
61
        self._called = (args, kwargs)