Fix #142: Firefox opening multiple windows

Try to open new tab and not window.
Fix test case fail.
This commit is contained in:
Arun Prakash Jana 2017-04-02 22:17:51 +05:30
parent 84694f95ce
commit a1c1092987
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 2 additions and 2 deletions

View File

@ -2239,7 +2239,7 @@ def browse(url):
os.dup2(fd, 2)
os.dup2(fd, 1)
try:
webbrowser.open(url)
webbrowser.open(url, new=2)
except Exception as e:
logerr('browse(): %s', e)
finally:

View File

@ -235,7 +235,7 @@ def test_browse(url, opened_url):
with mock.patch('buku.webbrowser') as m_webbrowser:
import buku
buku.browse(url)
m_webbrowser.open.assert_called_once_with(opened_url)
m_webbrowser.open.assert_called_once_with(opened_url, new=2)
@only_python_3_5