Home | History | Annotate | Download | only in network_SIMLocking

Lines Matching refs:SIM

13 from autotest_lib.client.cros.cellular.pseudomodem import sim
20 Test the SIM locking functionality of shill.
23 - Attempt to enable SIM lock with incorrect sim-pin. Verify that the
25 - Successfully pin-lock the SIM.
26 - Unlock a pin-locked SIM.
27 - Attempt to unlock a pin-locked SIM with incorrect sim-pin, until it gets
29 - Unblock a puk-locked SIM.
30 - Attempt to unblock a puk-locked SIM with incorrect sim-puk, until the
31 SIM gets blocked. At this point, a sim-pin2 might be expected by some
32 SIMs. This test does not attempt to unlock the SIM using sim-pin2.
33 - Test the functionality to change sim-pin.
40 """ Obtain a pin that does not match the valid sim-pin. """
49 """ Obtain a puk that does not match the valid sim-puk. """
84 """ Helper method to safely obtain SIM lock status. """
95 """ Helper method to check if the SIM lock is enabled. """
107 """ Helper method to check if the SIM has been pin-locked. """
119 """ Helper method to check if the SIM has been puk-locked. """
145 """ Helper method to reset the modem with the SIM locked. """
146 # When the SIM is locked, the enable operation fails and
149 # the disabled state after the SIM is unlocked.
156 """ Helper method to pin-lock a SIM, assuming nothing bad happens. """
160 raise error.TestFail('Expected SIM to be locked after reset.')
164 """ Helper method to puk-lock a SIM, assuming nothing bad happens. """
173 raise error.TestFail('Expected SIM to be puk-locked.')
179 """ Test SIM lock enable failes with incorrect sim-pin. """
180 logging.debug('Attempting to enable SIM lock with incorrect PIN.')
193 raise error.TestFail('SIM lock got enabled by incorrect PIN.')
195 # SIM lock should not be enabled, and lock not set after reset.
208 Test successfully enabling SIM lock and locking the SIM with
212 logging.debug('Attempting to enable SIM lock with correct pin.')
216 raise error.TestFail('SIM lock was not enabled by correct PIN.')
219 # SIM lock should be enabled, and lock set after reset.
226 Test successfully unlocking the SIM after it has been pin-locked.
229 # First, pin-lock the SIM.
236 raise error.TestFail('Failed to unlock a pin-locked SIM with '
239 raise error.TestFail('SIM lock got disabled when attemping to'
240 'unlock a pin-locked SIM.')
243 'after a successful unlock of pin-locked SIM. '
246 # The shill service reappears after the SIM is unlocked.
258 """ Test the flow that causes a SIM to be puk-locked. """
259 # First, pin-lock the SIM.
265 raise error.TestFail('Expected a positive number of sim-puk '
286 # At this point, the SIM should be puk-locked.
288 raise error.TestFail('Could not puk-lock the SIM after sufficient '
292 'after the SIM got puk-locked.')
296 """ Unlock a puk-locked SIM. """
297 # First, puk-lock the SIM
304 raise error.TestFail('Failed to unlock a puk-locked SIM with '
310 raise error.TestFail('SIM lock got disabled when attemping to'
311 'unlock a pin-locked SIM.')
315 # First, puk-lock the SIM.
321 raise error.TestFail('Expected a positive number of sim-puk '
346 # (1) SIM locking is enabled.
347 # (2) SIM is currently not locked.
348 # (3) The correct sim-pin is used as the old_pin argument in ChangePin.
351 # the sim-pin.
353 # Attempt to change the sim-pin when SIM locking is not enabled.
356 raise error.TestFail('Expected ChangePin to fail when SIM lock is '
363 # Attempt to change the sim-pin with incorrect current sim_pin.
367 'sim-pin.')
372 # Change sim-pin successfully.
377 raise error.TestFail('Expected to be able to disable SIM lock with '
378 'the new sim-pin')
388 self.current_pin = sim.SIM.DEFAULT_PIN
389 sim.SIM.DEFAULT_PUK
397 # Be a little cynical and make sure that SIM locks are as expected
402 'Cellular device in bad initial sim-lock state. '