def test_bin_version_ok(self): with patch('apsconnectcli.apsconnect.sys') as sys_mock, \ patch(_BUILTINS_OPEN) as open_mock: open_mock.return_value.__enter__.return_value.read.return_value = 'v100500' sys_mock._MEIPASS = '******' result = bin_version() open_mock.assert_called_once_with(os.path.join(sys_mock._MEIPASS, 'VERSION')) self.assertEqual(result, 'v100500')
def test_bin_version_exception(self): self.assertEqual(bin_version(), None)