@@ -83,24 +83,23 @@ def test_finish_launch(self, mock_get, rp_service):
8383 :param rp_service: Pytest fixture
8484 """
8585 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 ())
8788 assert _get_msg == {"id" : 111 }
8889
8990 @mock .patch ('platform.system' , mock .Mock (return_value = 'linux' ))
9091 @mock .patch ('platform.machine' , mock .Mock (return_value = 'Windows-PC' ))
9192 @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 ):
9595 """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' ,
9898 'cpu' : 'amd' ,
9999 'machine' : 'Windows-PC' ,
100100 'os' : 'linux' }
101-
102- cond = (ReportPortalService .get_system_information ('pytest' )
103- == expected_result )
101+ cond = (ReportPortalService .get_system_information (
102+ 'reportportal-client' ) == expected_result )
104103 assert cond
105104
106105 @mock .patch ('platform.system' , mock .Mock ())
0 commit comments