@@ -83,24 +83,23 @@ def test_finish_launch(self, mock_get, rp_service):
83
83
:param rp_service: Pytest fixture
84
84
"""
85
85
mock_get .return_value = {"id" : 111 }
86
- _get_msg = rp_service .finish_launch ('name' , datetime .now ().isoformat ())
86
+ _get_msg = rp_service .finish_launch (
87
+ 'name' , datetime .now ().isoformat ())
87
88
assert _get_msg == {"id" : 111 }
88
89
89
90
@mock .patch ('platform.system' , mock .Mock (return_value = 'linux' ))
90
91
@mock .patch ('platform.machine' , mock .Mock (return_value = 'Windows-PC' ))
91
92
@mock .patch ('platform.processor' , mock .Mock (return_value = 'amd' ))
92
- @mock .patch ('pkg_resources.get_distribution' ,
93
- mock .Mock (return_value = 'pytest 5.0' ))
94
- def test_get_system_information (self ):
93
+ @mock .patch ('pkg_resources.get_distribution' )
94
+ def test_get_system_information (self , distro ):
95
95
"""Test for validate get_system_information."""
96
-
97
- expected_result = {'agent' : 'pytest-pytest 5.0' ,
96
+ distro . return_value . version = '5.0'
97
+ expected_result = {'agent' : 'reportportal-client- 5.0' ,
98
98
'cpu' : 'amd' ,
99
99
'machine' : 'Windows-PC' ,
100
100
'os' : 'linux' }
101
-
102
- cond = (ReportPortalService .get_system_information ('pytest' )
103
- == expected_result )
101
+ cond = (ReportPortalService .get_system_information (
102
+ 'reportportal-client' ) == expected_result )
104
103
assert cond
105
104
106
105
@mock .patch ('platform.system' , mock .Mock ())
0 commit comments