fix: test: empty third row

This commit is contained in:
rachmadaniHaryono 2019-04-30 12:45:51 +08:00
parent cd302c45ac
commit 40c1a90147
2 changed files with 2 additions and 1 deletions

2
buku
View File

@ -2812,7 +2812,7 @@ def convert_bookmark_set(
out += (' <DT><A HREF="%s" ADD_DATE="%s" LAST_MODIFIED="%s"' % (row[1], timestamp, timestamp))
if row[3] != DELIM:
out += ' TAGS="' + row[3][1:-1] + '"'
out += '>' + row[2] + '</A>\n'
out += '>' + row[2] if row[2] else '' + '</A>\n'
if row[4] != '':
out += ' <DD>' + row[4] + '\n'
count += 1

View File

@ -750,6 +750,7 @@ def test_convert_bookmark_set(export_type, exp_res, monkeypatch):
import buku
bms = [
(1, 'htttp://example.com', '', ',', '', 0),
(1, 'htttp://example.com', None, ',', '', 0),
(2, 'http://google.com', 'Google', ',', '', 0)]
if export_type == 'random':
with pytest.raises(AssertionError):