cellular: Wait for modem to be available

If a test is started right after another test concludes, there is no
guarantee that the modem is already available. Wait until the modem
shows up to continue the test.

BUG=b:197016574
TEST=test_that --board=trogdor --fast lazorhome cellular_Identifiers.tmobile

Change-Id: I6d2c4785786e6a12f96c1c7832970715e70e1032
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3152214
Tested-by: Andrew Lassalle <andrewlassalle@chromium.org>
Reviewed-by: Pavan Holla <pholla@google.com>
Reviewed-by: Srikanth Oruganti <srikanthkumar@google.com>
Commit-Queue: Andrew Lassalle <andrewlassalle@chromium.org>
diff --git a/client/cros/cellular/test_environment.py b/client/cros/cellular/test_environment.py
index 1929c81..a34a086 100644
--- a/client/cros/cellular/test_environment.py
+++ b/client/cros/cellular/test_environment.py
@@ -341,7 +341,7 @@
         if mm_proxy is None:
             raise error.TestError('Modem manager is not initialized')
 
-        modem_proxy = mm_proxy.get_modem()
+        modem_proxy = mm_proxy.wait_for_modem(mm1_constants.MM_MODEM_POLL_TIME)
         if modem_proxy is None:
             raise error.TestError('Modem not initialized')