Ignore:
Timestamp:
20 Jun 2011, 00:30:10 (13 years ago)
Author:
uli
Message:

Start to make the whole accesscode story work again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscodes.py

    r6408 r6413  
    3434
    3535class AccessCodeHelpersTests(FunctionalTestCase):
     36    # Tests for helpers like get_access_code, disable_accesscode, ...
    3637
    3738    layer = FunctionalLayer
     
    9091
    9192    def test_invalidate_accesscode(self):
    92         assert self.ac1._invalidation_date is None
     93        assert self.ac1.used is False
    9394        result = invalidate_accesscode('APP-1-11111111')
    94         assert self.ac1._invalidation_date is not None
     95        assert self.ac1.used is True
    9596        assert result is True
    9697
    9798    def test_disable_accesscode_unused(self):
    9899        # we can disable initialized acs
    99         assert self.ac1._disabled is False
     100        assert self.ac1.disabled is False
    100101        disable_accesscode('APP-1-11111111')
    101         assert self.ac1._disabled is True
     102        assert self.ac1.disabled is True
    102103
    103104    def test_disable_accesscode_used(self):
    104105        # we can disable already used acs
    105         assert self.ac1._disabled is False
     106        assert self.ac1.disabled is False
    106107        invalidate_accesscode('APP-1-11111111')
    107108        disable_accesscode('APP-1-11111111')
    108         assert self.ac1._disabled is True
     109        assert self.ac1.disabled is True
    109110
    110111    def test_reenable_accesscode(self):
     
    113114        result = reenable_accesscode('APP-1-11111111')
    114115        assert result is True
    115         assert self.ac1._disabled is False
     116        assert self.ac1.disabled is False
    116117
    117118    def test_fire_transition(self):
     
    163164            InvalidTransitionError,
    164165            fire_transition, 'APP-1-11111111', 'init') # already initialized
     166
Note: See TracChangeset for help on using the changeset viewer.