Changeset 5694

Show
Ignore:
Timestamp:
11/17/08 11:10:44 (2 months ago)
Author:
carndt
Message:

Use super() in identity test classes and do things in right order in setUp/tearDown

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/turbogears/identity/tests/test_identity.py

    r5276 r5694  
    171171        config.update(test_config['global']) 
    172172        self.root = IdentityRoot 
    173         testutil.TGTest.setUp(self
     173        super(TestIdentity, self).setUp(
    174174        self.init_model() 
    175175 
    176176    def tearDown(self): 
    177         testutil.TGTest.tearDown(self
     177        super(TestIdentity, self).tearDown(
    178178        config.update(self._original_config) 
    179179 
     
    369369 
    370370    def test_logout(self): 
    371         """Test that logout works and session is gets invalid afterwards.""" 
     371        """Test that logout works and session id gets invalid afterwards.""" 
    372372        response = self.app.get('/in_peon_group?' 
    373373            'user_name=samIam&password=secret&login=Login') 
     
    378378 
    379379    def test_require_group(self): 
    380         """Test that a anonymous user""" 
     380        """Test that a anonymous user can not access resource protected by 
     381        require(in_group(...))""" 
    381382        response = self.app.get('/in_peon_group', status=401) 
    382383        assert 'identity_failed_answer' in response, response 
     
    507508        self._identity_on = config.get('identity.on', False) 
    508509        config.update({'identity.on': False}) 
    509         startup.startTurboGears() 
    510         testutil.DBTest.setUp(self
     510        super(TestTGUser, self).setUp() 
     511        startup.startTurboGears(
    511512 
    512513    def tearDown(self): 
    513         testutil.DBTest.tearDown(self) 
    514514        startup.stopTurboGears() 
     515        super(TestTGUser, self).tearDown() 
    515516        config.update({'identity.on': self._identity_on}) 
    516517