Ejemplo n.º 1
0
    def test_setup_succes_default_path(self, adb):
        adb_instance = MagicMock()
        adb_instance._ADB__error = None
        adb.return_value = adb_instance

        Adb.setup()

        assert isinstance(Adb.adb, MagicMock)
        adb.assert_called_once_with(adb_path='adb')
Ejemplo n.º 2
0
 def test_setup_error(self, adb):
     adb_instance = MagicMock()
     adb_instance._ADB__error = True
     adb.return_value = adb_instance
     with pytest.raises(Adb.AdbError):
         Adb.setup()