commit
b29c8faaef
@ -4,7 +4,7 @@ python:
|
|||||||
- "3.4"
|
- "3.4"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
before_install:
|
before_install:
|
||||||
- pip install pytest pytest-cov
|
- pip install pytest pytest-cov pytest-catchlog
|
||||||
install: "pip install -r requirements.txt"
|
install: "pip install -r requirements.txt"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@ -234,14 +234,17 @@ class TestBukuDb(unittest.TestCase):
|
|||||||
# def test_import_bookmark(self):
|
# def test_import_bookmark(self):
|
||||||
# self.fail()
|
# self.fail()
|
||||||
|
|
||||||
def test_print_bookmark(capsys, setup):
|
def test_print_bookmark(capsys, caplog, setup):
|
||||||
bdb = BukuDb()
|
bdb = BukuDb()
|
||||||
out, err = capsys.readouterr()
|
out, err = capsys.readouterr()
|
||||||
# calling with nonexistent index
|
# calling with nonexistent index
|
||||||
bdb.print_bookmark(1)
|
bdb.print_bookmark(1)
|
||||||
out, err = capsys.readouterr()
|
out, err = capsys.readouterr()
|
||||||
#assert out == "[ERROR] No matching index"
|
|
||||||
assert err == ''
|
for record in caplog.records:
|
||||||
|
assert record.levelname == "ERROR"
|
||||||
|
assert record.getMessage() == "No matching index"
|
||||||
|
assert (out, err) == ('', '')
|
||||||
|
|
||||||
# adding bookmarks
|
# adding bookmarks
|
||||||
bdb.add_bookmark("http://full-bookmark.com", "full", parse_tags(['full,bookmark']), "full bookmark")
|
bdb.add_bookmark("http://full-bookmark.com", "full", parse_tags(['full,bookmark']), "full bookmark")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user