Skip to content

Commit

Permalink
testcode for mark all as read [#28]
Browse files Browse the repository at this point in the history
  • Loading branch information
tribela committed Jan 14, 2014
1 parent 6cdf08d commit f55ec63
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/web_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,21 @@ def test_entry_read_unread(xmls, fx_test_stage):
assert not stage.feeds[feed_three_id].entries[0].read


def test_mark_all_as_read(xmls, fx_test_stage):
with app.test_client() as client:
r = client.get('/entries/')
assert r.status_code == 200
result = json.loads(r.data)

r = client.put(result['read_url'])
assert r.status_code == 200

with fx_test_stage as stage:
for sub in stage.subscriptions.recursive_subscriptions:
for entry in stage.feeds[sub.feed_id].entries:
assert entry.read


def test_entry_star_unstar(xmls, fx_test_stage):
with app.test_client() as client:
feed_three_id = get_hash('http://feedthree.com/feed/atom/')
Expand Down

0 comments on commit f55ec63

Please sign in to comment.