Permalink
Browse files

fix intermittently failing tags test

  • Loading branch information...
1 parent ddbf634 commit e3efe8e10ea4eaa375f110f4023419b06a7ab74b @dae committed Sep 5, 2016
Showing with 5 additions and 3 deletions.
  1. +5 −3 tests/test_sync.py
View
@@ -166,15 +166,17 @@ def test_cards():
@nose.with_setup(setup_modified)
def test_tags():
test_sync()
- assert deck1.tags.all() == deck2.tags.all()
+ def sortedTags(deck):
+ return sorted(deck.tags.all())
+ assert sortedTags(deck1) == sortedTags(deck2)
deck1.tags.register(["abc"])
deck2.tags.register(["xyz"])
- assert deck1.tags.all() != deck2.tags.all()
+ assert sortedTags(deck1) != sortedTags(deck2)
deck1.save()
time.sleep(0.1)
deck2.save()
assert client.sync() == "success"
- assert deck1.tags.all() == deck2.tags.all()
+ assert sortedTags(deck1) == sortedTags(deck2)
@nose.with_setup(setup_modified)
def test_decks():

0 comments on commit e3efe8e

Please sign in to comment.