blob: e6eff7cec5ff36b3b36aa23763d427b10a109483 [file] [log] [blame]
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.client.bin import test
from autotest_lib.client.common_lib import error
from autotest_lib.client.cros.cellular.pseudomodem import pseudomodem
from autotest_lib.client.cros import flimflam_test_path
import flimflam
class network_3GModemPresent(test.test):
"""
Tests that a 3G modem is available.
The test attempts to find a shill device corresponding to a cellular modem.
"""
version = 1
def run_once(self, pseudo_modem=False, pseudomodem_family='3GPP'):
with pseudomodem.TestModemManagerContext(pseudo_modem,
pseudomodem_family):
flim = flimflam.FlimFlam()
device = flim.FindCellularDevice()
if not device:
raise error.TestFail("Could not find cellular device")