move get_todos and set db paths
This commit is contained in:
parent
b8a7d6399c
commit
34572a968b
1 changed files with 11 additions and 0 deletions
|
@ -1,6 +1,17 @@
|
|||
import my.books.kobo.kobuddy
|
||||
kobuddy.set_databases('/L/backups/kobo')
|
||||
|
||||
from my.books.kobo.kobuddy import *
|
||||
|
||||
|
||||
def get_todos():
|
||||
def with_todo(ann):
|
||||
if ann is None:
|
||||
ann = ''
|
||||
return 'todo' in ann.lower().split()
|
||||
return by_annotation(with_todo)
|
||||
|
||||
|
||||
def test_todos():
|
||||
todos = get_todos()
|
||||
assert len(todos) > 3
|
||||
|
|
Loading…
Add table
Reference in a new issue