backport py27 compatible file open with encoding
client and builder needs to run on py27 which doesn't support open(encoding='utf-8') Related: https://pagure.io/koji/issue/2641
This commit is contained in:
parent
9e376a22b0
commit
c6e69b4f8b
10 changed files with 62 additions and 59 deletions
|
|
@ -333,7 +333,7 @@ config_opts['macros']['%distribution'] = 'Koji Testing'
|
|||
fobj = mock.MagicMock()
|
||||
openf.return_value.__enter__.return_value = fobj
|
||||
anon_handle_mock_config(options, session, arguments)
|
||||
openf.assert_called_with('/tmp/mock.out', 'wt', encoding='utf-8')
|
||||
openf.assert_called_once()
|
||||
fobj.write.assert_called_once_with(self.mock_output)
|
||||
gen_config_mock.assert_called_with(
|
||||
self.progname, arch, **opts)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue