Ejemplo n.º 1
0
 def test_clientinfo(self):
     from xpra.server.source.clientinfo_mixin import ClientInfoMixin
     x = ClientInfoMixin()
     x.init_state()
     assert x.get_connect_info()
     assert x.get_info()
     c = typedict()
     x.parse_client_caps(c)
     assert x.get_connect_info()
     assert x.get_info()
     x.cleanup()
     assert x.get_connect_info()
     assert x.get_info()
Ejemplo n.º 2
0
 def get_info(self):
     info = {
         "protocol": "xpra",
         "connection_time": int(self.connection_time),
         "elapsed_time": int(monotonic_time() - self.connection_time),
         "counter": self.counter,
         "hello-sent": self.hello_sent,
         "bandwidth-limit": {
             "setting": self.bandwidth_limit or 0,
             "actual": self.soft_bandwidth_limit or 0,
         }
     }
     p = self.protocol
     if p:
         info.update({
             "connection": p.get_info(),
         })
     info.update(self.get_features_info())
     merge_dicts(info, FilePrintMixin.get_info(self))
     merge_dicts(info, AudioMixin.get_info(self))
     merge_dicts(info, MMAP_Connection.get_info(self))
     merge_dicts(info, NetworkStateMixin.get_info(self))
     merge_dicts(info, ClientInfoMixin.get_info(self))
     merge_dicts(info, WindowsMixin.get_info(self))
     merge_dicts(info, EncodingsMixin.get_info(self))
     merge_dicts(info, AVSyncMixin.get_info(self))
     merge_dicts(info, ClientDisplayMixin.get_info(self))
     merge_dicts(info, IdleMixin.get_info(self))
     merge_dicts(info, ClipboardConnection.get_info(self))
     return info
Ejemplo n.º 3
0
 def test_clientinfo(self):
     from xpra.server.source.clientinfo_mixin import ClientInfoMixin
     self._test_mixin_class(ClientInfoMixin)
     x = ClientInfoMixin()
     x.init_state()
     assert x.get_connect_info()
     assert x.get_info()
     c = typedict()
     c.update({
         "session-type": "test",
         "opengl": {
             "renderer": "fake"
         },
         "proxy": True,
         "proxy.hostname": "some-hostname",
     })
     x.parse_client_caps(c)
     assert x.get_connect_info()
     assert x.get_info()
     x.cleanup()
     assert x.get_connect_info()
     assert x.get_info()