Skip to content

Commit

Permalink
check dbsize() instead of keys("*") in case of db with billions of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Wilber (GetGlue) committed Jun 2, 2012
1 parent 8ce2b4b commit 85e1b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def setup():
global t
db = 9
t = taxon.Taxon(Redis(db=db))
if len(t.keys('*')) > 0:
if t.dbsize() > 0:
raise RuntimeError("Redis DB %d is not empty" % db)


Expand Down

0 comments on commit 85e1b30

Please sign in to comment.