Skip to content

Commit

Permalink
Compatibility between experimental and normal modes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Apr 8, 2013
1 parent 08c9e0f commit cc4a4c3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions taskw/test/test_datas.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ def test_updating_task(self):

tasks = self.tw.load_tasks()
eq_(len(tasks['pending']), 1)

# For compatibility with the normal and experimental modes.
# Experimental returns more information.
try:
# Experimental mode returns the correct urgency, so,
# let's just not compare for now.
del tasks['pending'][0]['urgency']
del task['urgency']

# Also, experimental mode returns the id. So, avoid comparing.
del tasks['pending'][0]['id']
except:
pass

eq_(tasks['pending'][0], task)

@raises(KeyError)
Expand Down

0 comments on commit cc4a4c3

Please sign in to comment.