def setup_class(cls): cls.device_iden = "test_iden" device_info = {"active": True, "iden": cls.device_iden, "created": time.time(), "modified": time.time(), "icon": "system", "generated_nickname": False, "nickname": "test dev", "manufacturer": "test c", "model": "test m", "has_sms": False} cls.account = mock.Mock(return_value=True) cls.device = device.Device(cls.account, device_info)
def setup_class(self): self.device_iden = "test_iden" self.device_info = { "active": True, "iden": self.device_iden, "created": time.time(), "modified": time.time(), "icon": "system", "generated_nickname": False, "nickname": "test dev", "manufacturer": "test c", "model": "test m", "has_sms": False, } self.account = Mock(return_value=True) self.device = device.Device(self.account, self.device_info)
def test_no_icon(self): del self.device_info["icon"] new_device = device.Device(self.account, self.device_info) assert new_device.icon == "system"
def setup_class(cls): cls.device_iden = "test_iden" device_info = {"active": True, "iden": cls.device_iden, "created": time.time(), "modified": time.time(), "type": "stream", "kind": "stream", "nickname": "test dev", "manufacturer": "test c", "model": "test m", "pushable": True} cls.account = mock.Mock(return_value=True) cls.device = device.Device(cls.account, device_info)