def test_get_device(self): devices = [self.device1, self.device2, self.device3, self.device4] self.add_test_app(devices=devices) self.assertEqual(get_device(self.app_name, 'test1'), self.device1)
def test_get_device_no_devices(self): self.add_test_app() self.assertIsNone(get_device(self.app_name, 'test1'))
def test_get_device_no_matching_device(self): devices = [self.device1, self.device2, self.device3, self.device4] self.add_test_app(devices=devices) self.assertIsNone(get_device(self.app_name, 'invalid'))
def test_get_device_app_dne(self): self.assertIsNone(get_device('invalid', 'test1'))