Changeset 6413 for main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests
- Timestamp:
- 20 Jun 2011, 00:30:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscodes.py
r6408 r6413 34 34 35 35 class AccessCodeHelpersTests(FunctionalTestCase): 36 # Tests for helpers like get_access_code, disable_accesscode, ... 36 37 37 38 layer = FunctionalLayer … … 90 91 91 92 def test_invalidate_accesscode(self): 92 assert self.ac1. _invalidation_date is None93 assert self.ac1.used is False 93 94 result = invalidate_accesscode('APP-1-11111111') 94 assert self.ac1. _invalidation_date is not None95 assert self.ac1.used is True 95 96 assert result is True 96 97 97 98 def test_disable_accesscode_unused(self): 98 99 # we can disable initialized acs 99 assert self.ac1. _disabled is False100 assert self.ac1.disabled is False 100 101 disable_accesscode('APP-1-11111111') 101 assert self.ac1. _disabled is True102 assert self.ac1.disabled is True 102 103 103 104 def test_disable_accesscode_used(self): 104 105 # we can disable already used acs 105 assert self.ac1. _disabled is False106 assert self.ac1.disabled is False 106 107 invalidate_accesscode('APP-1-11111111') 107 108 disable_accesscode('APP-1-11111111') 108 assert self.ac1. _disabled is True109 assert self.ac1.disabled is True 109 110 110 111 def test_reenable_accesscode(self): … … 113 114 result = reenable_accesscode('APP-1-11111111') 114 115 assert result is True 115 assert self.ac1. _disabled is False116 assert self.ac1.disabled is False 116 117 117 118 def test_fire_transition(self): … … 163 164 InvalidTransitionError, 164 165 fire_transition, 'APP-1-11111111', 'init') # already initialized 166
Note: See TracChangeset for help on using the changeset viewer.