Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
    def test_no_icon(self):
        del self.device_info["icon"]

        new_device = device.Device(self.account, self.device_info)

        assert new_device.icon == "system"
Ejemplo n.º 4
0
 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)