OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from autotest_lib.client.common_lib import error | 5 from autotest_lib.client.common_lib import error |
6 from autotest_lib.client.cros import cryptohome, ui_test | 6 from autotest_lib.client.cros import cros_ui_test, cryptohome |
7 | 7 |
8 class login_CryptohomeUnmounted(ui_test.UITest): | 8 class login_CryptohomeUnmounted(cros_ui_test.UITest): |
9 version = 1 | 9 version = 1 |
10 | 10 |
11 | 11 |
12 def run_once(self): | 12 def run_once(self): |
13 if not cryptohome.is_mounted(allow_fail=False): | 13 if not cryptohome.is_mounted(allow_fail=False): |
14 raise error.TestFail('Expected cryptohome to be mounted') | 14 raise error.TestFail('Expected cryptohome to be mounted') |
15 | 15 |
16 self.logout() | 16 self.logout() |
17 | 17 |
18 # allow the command to fail, so we can handle the error here | 18 # allow the command to fail, so we can handle the error here |
19 if cryptohome.is_mounted(allow_fail=True): | 19 if cryptohome.is_mounted(allow_fail=True): |
20 raise error.TestFail('Expected cryptohome NOT to be mounted') | 20 raise error.TestFail('Expected cryptohome NOT to be mounted') |
OLD | NEW |