def _get_launch_attributes(self):
     """Return launch attributes in the format supported by the rp."""
     attributes = self._cfg.launch_attributes or []
     system_attributes = get_launch_sys_attrs()
     system_attributes["agent"] = "{}-{}".format(self.agent_name,
                                                 self.agent_version)
     return attributes + _dict_to_payload(system_attributes)
Beispiel #2
0
    def _get_launch_attributes(cmd_attrs):
        """Generate launch attributes including both system and user ones.

        :param list cmd_attrs: List for attributes from the pytest.ini file
        """
        attributes = cmd_attrs or []
        system_info = get_launch_sys_attrs()
        system_attributes = _dict_to_payload(system_info)
        return attributes + system_attributes
Beispiel #3
0
    def _get_launch_attributes(self, ini_attrs):
        """Generate launch attributes in the format supported by the client.

        :param list ini_attrs: List for attributes from the pytest.ini file
        """
        attributes = ini_attrs or []
        system_attributes = get_launch_sys_attrs()
        system_attributes['agent'] = ('{}-{}'.format(self.agent_name,
                                                     self.agent_version))
        return attributes + _dict_to_payload(system_attributes)
    def _get_launch_attributes(self, cmd_attrs):
        """Generate launch attributes including both system and user ones.

        :param list cmd_attrs: List for attributes from the command line
        """
        attributes = cmd_attrs or []
        system_attributes = get_launch_sys_attrs()
        system_attributes['agent'] = ('{}-{}'.format(self.agent_name,
                                                     self.agent_version))
        return attributes + _dict_to_payload(system_attributes)
Beispiel #5
0
    def _get_launch_attributes(cmd_attrs):
        """Generate launch attributes including both system and user ones.

        :param list cmd_attrs: List for attributes from the pytest.ini file
        """
        attributes = cmd_attrs or []
        system_info = RobotService.rp.get_system_information(
            Variables.agent_name)
        system_info['system'] = True
        system_attributes = _dict_to_payload(system_info)
        return attributes + system_attributes
Beispiel #6
0
    def _get_launch_attributes(self, ini_attrs):
        """Generate launch attributes in the format supported by the client.

        :param list ini_attrs: List for attributes from the pytest.ini file
        """
        attributes = ini_attrs or []

        system_info = self.rp.get_system_information(self._agent_name)
        system_info['system'] = True
        system_attributes = _dict_to_payload(system_info)

        return attributes + system_attributes
Beispiel #7
0
 def test_dict_to_payload_with_system_key(self, system):
     """Test convert dict to list of dicts with key system."""
     initial_dict = {'aa': 1, 'b': 2, 'system': system}
     expected_list = [{
         'key': 'aa',
         'value': '1',
         'system': system
     }, {
         'key': 'b',
         'value': '2',
         'system': system
     }]
     assert _dict_to_payload(initial_dict) == expected_list